From 933f7f7526d89a4ad41e2c2936c26cb41997ed78 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 1 Sep 2013 22:59:51 +0200 Subject: [PATCH] Send a RELOAD to a running tincd when a new invitation key has been generated. --- src/invitation.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/invitation.c b/src/invitation.c index 3f7f9764..6ccfc1f4 100644 --- a/src/invitation.c +++ b/src/invitation.c @@ -340,12 +340,17 @@ int cmd_invite(int argc, char *argv[]) { } chmod(filename, 0600); ecdsa_write_pem_private_key(key, f); + fclose(f); + + if(connect_tincd(false)) + sendline(fd, "%d %d", CONTROL, REQ_RELOAD); } else { key = ecdsa_read_pem_private_key(f); + fclose(f); if(!key) fprintf(stderr, "Could not read private key from %s\n", filename); } - fclose(f); + free(filename); if(!key) return 1; -- 2.39.5