X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Finvitation.c;h=c059ca3c2ca31d562f684851c0df8e2e98789145;hb=e5b9bd324cc24355956e9e59e5ec2df72cf9d469;hp=5dc8c6300e452819caa3c963b44b843886bcf9a8;hpb=bdeba3f9c26f9225c17c097ca490dc651cd40b90;p=tinc diff --git a/src/invitation.c b/src/invitation.c index 5dc8c630..c059ca3c 100644 --- a/src/invitation.c +++ b/src/invitation.c @@ -414,8 +414,10 @@ int cmd_invite(int argc, char *argv[]) { fclose(f); - if(connect_tincd(false)) { + if(connect_tincd(true)) { sendline(fd, "%d %d", CONTROL, REQ_RELOAD); + } else { + fprintf(stderr, "Could not signal the tinc daemon. Please restart or reload it manually.\n"); } } else { key = ecdsa_read_pem_private_key(f); @@ -1065,7 +1067,7 @@ static bool invitation_receive(void *handle, uint8_t type, const void *msg, uint return finalize_join(); case 2: - fprintf(stderr, "Invitation succesfully accepted.\n"); + fprintf(stderr, "Invitation successfully accepted.\n"); shutdown(sock, SHUT_RDWR); success = true; break; @@ -1201,6 +1203,7 @@ next: aip = aip->ai_next; if(!aip) { + freeaddrinfo(ai); return 1; } } @@ -1246,6 +1249,8 @@ next: goto next; } + freeaddrinfo(ai); + // Check if the hash of the key he gave us matches the hash in the URL. char *fingerprint = line + 2; char hishash[64];