mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-31 01:33:44 -04:00
Fix error in c897761ee330e3c62d041c837abbb6f9b3b19b7c
Changed the way it's detected if speaker id is hex or dec
This commit is contained in:
parent
c897761ee3
commit
736d19f924
@ -1513,16 +1513,21 @@ dacp_reply_setspeakers(struct evhttp_request *req, struct evbuffer *evbuf, char
|
|||||||
{
|
{
|
||||||
param++;
|
param++;
|
||||||
/* Hyperfine Remote for Android will send in decimal, others use hex */
|
/* Hyperfine Remote for Android will send in decimal, others use hex */
|
||||||
if (safe_atou64(param, &ids[i]) < 0)
|
if ((strlen(param) > 1) && (param[1] != 'x'))
|
||||||
{
|
ret = safe_atou64(param, &ids[i]);
|
||||||
ret = safe_hextou64(param, &ids[i]);
|
else
|
||||||
if (ret < 0)
|
ret = safe_hextou64(param, &ids[i]);
|
||||||
{
|
|
||||||
DPRINTF(E_LOG, L_DACP, "Invalid speaker id in request: %s\n", param);
|
|
||||||
|
|
||||||
nspk--;
|
if (ret < 0)
|
||||||
continue;
|
{
|
||||||
}
|
DPRINTF(E_LOG, L_DACP, "Invalid speaker id in request: %s\n", param);
|
||||||
|
|
||||||
|
nspk--;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DPRINTF(E_DBG, L_DACP, "Speaker id converted with ret %d, param %s, dec val %llu.\n", ret, param, ids[i]);
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user