diff --git a/mdns_external.c b/mdns_external.c index 17884f94..cf4d215a 100644 --- a/mdns_external.c +++ b/mdns_external.c @@ -80,15 +80,17 @@ static int fork_execvp(const char *file, char *const argv[]) { return response; } -static int mdns_external_avahi_register(char *apname, __attribute__((unused)) int port, - __attribute__((unused)) char **txt_records) { +static int mdns_external_avahi_register(char *ap1name, __attribute__((unused)) char *ap2name, + __attribute__((unused)) int port, + __attribute__((unused)) char **txt_records, + __attribute__((unused)) char **secondary_txt_records) { char mdns_port[6]; snprintf(mdns_port, sizeof(mdns_port), "%d", config.port); char *argvwithoutmetadata[] = { - NULL, apname, config.regtype, mdns_port, MDNS_RECORD_WITHOUT_METADATA, NULL}; + NULL, ap1name, config.regtype, mdns_port, MDNS_RECORD_WITHOUT_METADATA, NULL}; #ifdef CONFIG_METADATA - char *argvwithmetadata[] = {NULL, apname, config.regtype, mdns_port, MDNS_RECORD_WITH_METADATA, + char *argvwithmetadata[] = {NULL, ap1name, config.regtype, mdns_port, MDNS_RECORD_WITH_METADATA, NULL}; #endif char **argv; @@ -120,16 +122,18 @@ static int mdns_external_avahi_register(char *apname, __attribute__((unused)) in return -1; } -static int mdns_external_dns_sd_register(char *apname, __attribute__((unused)) int port, - __attribute__((unused)) char **txt_records) { +static int mdns_external_dns_sd_register(char *ap1name, __attribute__((unused)) char *ap2name, + __attribute__((unused)) int port, + __attribute__((unused)) char **txt_records, + __attribute__((unused)) char **secondary_txt_records) { char mdns_port[6]; snprintf(mdns_port, sizeof(mdns_port), "%d", config.port); char *argvwithoutmetadata[] = { - NULL, apname, config.regtype, mdns_port, MDNS_RECORD_WITHOUT_METADATA, NULL}; + NULL, ap1name, config.regtype, mdns_port, MDNS_RECORD_WITHOUT_METADATA, NULL}; #ifdef CONFIG_METADATA - char *argvwithmetadata[] = {NULL, apname, config.regtype, mdns_port, MDNS_RECORD_WITH_METADATA, + char *argvwithmetadata[] = {NULL, ap1name, config.regtype, mdns_port, MDNS_RECORD_WITH_METADATA, NULL}; #endif diff --git a/mdns_tinysvcmdns.c b/mdns_tinysvcmdns.c index 619f9d31..516160da 100644 --- a/mdns_tinysvcmdns.c +++ b/mdns_tinysvcmdns.c @@ -38,8 +38,9 @@ static struct mdnsd *svr = NULL; -static int mdns_tinysvcmdns_register(char *apname, int port, - __attribute__((unused)) char **txt_records) { +static int mdns_tinysvcmdns_register(char *ap1name, __attribute__((unused)) char *ap2name, int port, + __attribute__((unused)) char **txt_records, + __attribute__((unused)) char **secondary_txt_records) { struct ifaddrs *ifalist; struct ifaddrs *ifa; @@ -146,7 +147,7 @@ static int mdns_tinysvcmdns_register(char *apname, int port, strcat(extendedregtype, ".local"); struct mdns_service *svc = - mdnsd_register_svc(svr, apname, extendedregtype, port, NULL, + mdnsd_register_svc(svr, ap1name, extendedregtype, port, NULL, (const char **)txt); // TTL should be 75 minutes, i.e. 4500 seconds mdns_service_destroy(svc);