Skip to content

Commit

Permalink
[dacp] Increase current revision number even if there are no open req…
Browse files Browse the repository at this point in the history
…uests

This change aligns with iTunes behavior. It also means that a client that is
not long polling can use the revision number (cmsr) value to check for changes.
  • Loading branch information
ejurgensen committed Jan 10, 2020
1 parent 5d3c9da commit 59d7db1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/httpd_dacp.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,14 +698,14 @@ playstatusupdate_cb(int fd, short what, void *arg)
read(update_pipe[0], &dummy, sizeof(dummy));
#endif

current_rev++;

if (!update_requests)
goto readd;

CHECK_NULL(L_DACP, evbuf = evbuffer_new());
CHECK_NULL(L_DACP, update = evbuffer_new());

current_rev++;

ret = make_playstatusupdate(update);
if (ret < 0)
goto out_free_update;
Expand Down

0 comments on commit 59d7db1

Please sign in to comment.