Resolve the local host name before generating the invitation file.
This commit is contained in:
parent
65f5e8fba4
commit
160b7cb5e3
1 changed files with 3 additions and 1 deletions
|
@ -356,6 +356,9 @@ int cmd_invite(int argc, char *argv[]) {
|
||||||
if(!f)
|
if(!f)
|
||||||
abort();
|
abort();
|
||||||
|
|
||||||
|
// Get the local address
|
||||||
|
char *address = get_my_hostname();
|
||||||
|
|
||||||
// Fill in the details.
|
// Fill in the details.
|
||||||
fprintf(f, "Name = %s\n", argv[1]);
|
fprintf(f, "Name = %s\n", argv[1]);
|
||||||
if(netname)
|
if(netname)
|
||||||
|
@ -370,7 +373,6 @@ int cmd_invite(int argc, char *argv[]) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
// Create an URL from the local address, key hash and cookie
|
// Create an URL from the local address, key hash and cookie
|
||||||
char *address = get_my_hostname();
|
|
||||||
printf("%s/%s%s\n", address, hash, cookie);
|
printf("%s/%s%s\n", address, hash, cookie);
|
||||||
free(filename);
|
free(filename);
|
||||||
free(address);
|
free(address);
|
||||||
|
|
Loading…
Add table
Reference in a new issue