From: Mike Brady Date: Thu, 26 Mar 2020 17:03:53 +0000 (+0000) Subject: Remove leading zeroes from the DACP ID provided by mDNS X-Git-Tag: 3.3.7d12~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eef6bbf9839ff5c0434ff23fdcf8587bf1d17411;p=thirdparty%2Fshairport-sync.git Remove leading zeroes from the DACP ID provided by mDNS --- diff --git a/mdns_avahi.c b/mdns_avahi.c index caec909d..575eba08 100644 --- a/mdns_avahi.c +++ b/mdns_avahi.c @@ -96,6 +96,8 @@ static void resolve_callback(AvahiServiceResolver *r, AVAHI_GCC_UNUSED AvahiIfIn char *dacpid = strstr(name, "iTunes_Ctrl_"); if (dacpid) { dacpid += strlen("iTunes_Ctrl_"); + while (*dacpid == '0') + dacpid++; // remove any leading zeroes if (strcmp(dacpid, dbs->dacp_id) == 0) { debug(3, "resolve_callback: client dacp_id \"%s\" dacp port: %u.", dbs->dacp_id, port); #ifdef CONFIG_DACP_CLIENT