Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
htsp server: another fix for single epg event logic in getEvents
  • Loading branch information
perexg committed May 16, 2016
1 parent 0a2958a commit f027e3c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/htsp_server.c
Expand Up @@ -1563,13 +1563,11 @@ htsp_method_getEvents(htsp_connection_t *htsp, htsmsg_t *in)
/* Use event as starting point */
if (e || ch) {

if (e && !ch) ch = e->channel;
if (!e) e = ch->ch_epg_now ?: ch->ch_epg_next;

if (!htsp_user_access_channel(htsp, ch))
if (e && !htsp_user_access_channel(htsp, e->channel))
return htsp_error(htsp, N_("User does not have access"));

if (!e) e = ch->ch_epg_now ?: ch->ch_epg_next;

/* Output */
events = htsmsg_create_list();
while (e) {
Expand Down

0 comments on commit f027e3c

Please sign in to comment.