mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-13 21:12:56 -04:00
Handle DAAP activity request
Reply to the DAAP /activity request with 204 / No content. Used by iTunes to ping the server while streaming.
This commit is contained in:
parent
3cb9e147fe
commit
d231faff2d
@ -897,6 +897,13 @@ daap_reply_update(struct evhttp_request *req, struct evbuffer *evbuf, char **uri
|
||||
evhttp_send_reply(req, HTTP_OK, "OK", evbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
daap_reply_activity(struct evhttp_request *req, struct evbuffer *evbuf, char **uri, struct evkeyvalq *query)
|
||||
{
|
||||
/* That's so nice, thanks for letting us know */
|
||||
evhttp_send_reply(req, HTTP_NOCONTENT, "No Content", evbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
daap_reply_dblist(struct evhttp_request *req, struct evbuffer *evbuf, char **uri, struct evkeyvalq *query)
|
||||
{
|
||||
@ -1724,6 +1731,10 @@ static struct uri_map daap_handlers[] =
|
||||
.regexp = "^/update$",
|
||||
.handler = daap_reply_update
|
||||
},
|
||||
{
|
||||
.regexp = "^/activity$",
|
||||
.handler = daap_reply_activity
|
||||
},
|
||||
{
|
||||
.regexp = "^/databases$",
|
||||
.handler = daap_reply_dblist
|
||||
@ -1940,6 +1951,8 @@ daap_is_request(struct evhttp_request *req, char *uri)
|
||||
return 1;
|
||||
if (strcmp(uri, "/update") == 0)
|
||||
return 1;
|
||||
if (strcmp(uri, "/activity") == 0)
|
||||
return 1;
|
||||
if (strcmp(uri, "/logout") == 0)
|
||||
return 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user