Remove leading zeroes from the DACP ID provided by mDNS

This commit is contained in:
Mike Brady
2020-03-26 17:03:53 +00:00
parent 1b7e23c093
commit eef6bbf983
+2
View File
@@ -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