From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 8 Jul 2020 09:20:15 +0000 (+0100) Subject: Remove leading zeroes from an incoming DACP ID in another place X-Git-Tag: 3.3.7rc1~1^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=282871eaba2b61dc56d6451509d78e9fd9351abd;p=thirdparty%2Fshairport-sync.git Remove leading zeroes from an incoming DACP ID in another place --- diff --git a/mdns_avahi.c b/mdns_avahi.c index f3c1f1c9..fcbbe484 100644 --- a/mdns_avahi.c +++ b/mdns_avahi.c @@ -152,6 +152,8 @@ static void browse_callback(AvahiServiceBrowser *b, AvahiIfIndex interface, Avah char *dacpid = strstr(name, "iTunes_Ctrl_"); if (dacpid) { dacpid += strlen("iTunes_Ctrl_"); + while (*dacpid == '0') + dacpid++; // remove any leading zeroes if ((dbs->dacp_id) && (strcmp(dacpid, dbs->dacp_id) == 0)) dacp_monitor_port_update_callback(dbs->dacp_id, 0); // say the port is withdrawn } else {