Fix infinite loop on unknown DACP property

Missing strtok_r() call in the !dpm case.
This commit is contained in:
Julien BLACHE 2011-08-15 12:50:43 +02:00
parent 177d444f9f
commit 4472f9e955

View File

@ -1260,16 +1260,15 @@ dacp_reply_getproperty(struct evhttp_request *req, struct evbuffer *evbuf, char
while (prop)
{
dpm = dacp_find_prop(prop, strlen(prop));
if (!dpm)
if (dpm)
{
DPRINTF(E_LOG, L_DACP, "Could not find requested property '%s'\n", prop);
continue;
if (dpm->propget)
dpm->propget(proplist, &status, mfi);
else
DPRINTF(E_WARN, L_DACP, "No getter method for DACP property %s\n", prop);
}
if (dpm->propget)
dpm->propget(proplist, &status, mfi);
else
DPRINTF(E_WARN, L_DACP, "No getter method for DACP property %s\n", prop);
DPRINTF(E_LOG, L_DACP, "Could not find requested property '%s'\n", prop);
prop = strtok_r(NULL, ",", &ptr);
}