projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65f5e8f
)
Resolve the local host name before generating the invitation file.
author
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 20 Aug 2013 14:47:07 +0000
(16:47 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 20 Aug 2013 14:47:07 +0000
(16:47 +0200)
src/invitation.c
patch
|
blob
|
history
diff --git
a/src/invitation.c
b/src/invitation.c
index a59045090f75cc237331a85c89b7093b2dbc61bd..550fb5de2b089719812e90520e6bf0cdaac330ad 100644
(file)
--- 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);