From c2e6eeda3273c4ddca146424b61023d18080705e Mon Sep 17 00:00:00 2001 From: Craig Markwardt Date: Mon, 2 Jan 2012 04:22:39 -0500 Subject: [PATCH] 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. --- src/httpd_daap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/httpd_daap.c b/src/httpd_daap.c index 1ad40cfa..5e4690de 100644 --- a/src/httpd_daap.c +++ b/src/httpd_daap.c @@ -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);