hostname display
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user