Allow for an actual NULL DACP-ID string

This commit is contained in:
Mike Brady
2018-04-11 09:55:12 +01:00
parent 453c51fc08
commit 9e944e4050
3 changed files with 31 additions and 3 deletions
+4
View File
@@ -106,6 +106,9 @@ void mdns_unregister(void) {
void *mdns_dacp_monitor(char *dacp_id) {
void *reply = NULL;
if ((dacp_id==NULL) || (*dacp_id=='\0'))
debug(1, "A null or zero-length DACP-ID string was provided for monitoring -- nothing done.");
else {
if ((config.mdns) && (config.mdns->mdns_dacp_monitor)) {
reply = config.mdns->mdns_dacp_monitor(dacp_id);
if (reply == NULL) {
@@ -113,6 +116,7 @@ void *mdns_dacp_monitor(char *dacp_id) {
}
} else
debug(1, "Can't start a DACP monitor -- none registered.");
}
return reply;
}