From 160b7cb5e3e9b7869f6ca38e6a7ab2db39aba979 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Tue, 20 Aug 2013 16:47:07 +0200 Subject: [PATCH] Resolve the local host name before generating the invitation file. --- src/invitation.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/invitation.c b/src/invitation.c index a5904509..550fb5de 100644 --- a/src/invitation.c +++ b/src/invitation.c @@ -356,6 +356,9 @@ int cmd_invite(int argc, char *argv[]) { if(!f) abort(); + // Get the local address + char *address = get_my_hostname(); + // Fill in the details. fprintf(f, "Name = %s\n", argv[1]); if(netname) @@ -370,7 +373,6 @@ int cmd_invite(int argc, char *argv[]) { fclose(f); // Create an URL from the local address, key hash and cookie - char *address = get_my_hostname(); printf("%s/%s%s\n", address, hash, cookie); free(filename); free(address); -- 2.20.1