hostname display

This commit is contained in:
philippe44
2016-08-24 21:20:33 -07:00
parent b5ad81bb23
commit dfc1a69810
5 changed files with 3 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -280,7 +280,6 @@ int main(int argc, char *argv[]) {
printf("cannot find host address\n");
free(hostname);
free(hostname);
return print_usage();
@@ -288,9 +287,12 @@ int main(int argc, char *argv[]) {
}
svr = mdnsd_start(host);
if (svr == NULL) return print_usage();
txt = malloc((argc - 4 + 1) * sizeof(char**));
memcpy(txt, argv + 4, (argc - 4) * sizeof(char**));
txt[argc + 4] = NULL;
mdnsd_set_hostname(svr, hostname, host);