]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Remove leading zeroes from an incoming DACP ID in another place
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Wed, 8 Jul 2020 09:20:15 +0000 (10:20 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Wed, 8 Jul 2020 09:20:15 +0000 (10:20 +0100)
mdns_avahi.c

index f3c1f1c9599aa6355a350994576523c86c0dc12e..fcbbe4847f920379a81c49db143dc1abe3c6c43e 100644 (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 {