Remove leading zeroes from an incoming DACP ID in another place

This commit is contained in:
Mike Brady
2020-07-08 10:20:15 +01:00
parent ec5ff0fcfb
commit 282871eaba
+2
View File
@@ -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 {