Fixes for Amarok and Banshee clients which don't send

revision-number in their update request.

Details: Banshee (v1.6.1) and Amarok client players send an
update request but do not send the revision-number parameter.
iTunes version 10 (and perhaps earlier) does send this parameter.
See: https://github.com/jasonmc/forked-daapd/issues/78

Fix: function daap_reply_update() now warns when revision-number
is not submitted by the client, but does not reply with an error.
In that case the server assumes a revision-number which insures
an update is sent back to the client.

Testing:
I verified that the following clients were able to connect succesfully
and retrieve a library listing:
  * iTunes 10.5.2
  * iTunes 10.4.2
  * iTunes 9.7.1
  * Rhythmbox 0.12.8
  * Banshee 1.6.1
I can't test with Amarok since I don't have this client.
This commit is contained in:
Craig Markwardt 2012-01-02 04:22:39 -05:00
parent bd10978d52
commit c2e6eeda32

View File

@ -848,10 +848,10 @@ daap_reply_update(struct evhttp_request *req, struct evbuffer *evbuf, char **uri
param = evhttp_find_header(query, "revision-number");
if (!param)
{
DPRINTF(E_LOG, L_DAAP, "Missing revision-number in update request\n");
dmap_send_error(req, "mupd", "Invalid request");
return;
DPRINTF(E_LOG, L_DAAP, "Missing revision-number in client update request\n");
/* Some players (Amarok, Banshee) don't supply a revision number.
They get a standard update of everything. */
param = "1"; /* Default to "1" will insure update */
}
ret = safe_atoi32(param, &reqd_rev);