epg_mutex is no longer needed
This commit is contained in:
parent
7c5965e915
commit
3c9bd1473a
7 changed files with 0 additions and 49 deletions
|
@ -139,8 +139,6 @@ ajax_channel_tab(http_connection_t *hc, http_reply_t *hr,
|
|||
if(LIST_FIRST(&ch->ch_transports) == NULL)
|
||||
continue;
|
||||
|
||||
epg_lock();
|
||||
|
||||
tcp_qprintf(tq, "<div style=\"float:left; width: 25%%\">");
|
||||
|
||||
snprintf(dispname, sizeof(dispname), "%s", ch->ch_name);
|
||||
|
@ -170,7 +168,6 @@ ajax_channel_tab(http_connection_t *hc, http_reply_t *hr,
|
|||
|
||||
ajax_box_end(tq, AJAX_BOX_SIDEBOX);
|
||||
tcp_qprintf(tq, "</div>");
|
||||
epg_unlock();
|
||||
}
|
||||
|
||||
http_output_html(hc, hr);
|
||||
|
|
|
@ -100,8 +100,6 @@ autorec_check_new_ar(autorec_t *ar)
|
|||
event_t *e;
|
||||
th_channel_t *ch;
|
||||
|
||||
epg_lock();
|
||||
|
||||
LIST_FOREACH(ch, &channels, ch_global_link) {
|
||||
e = ch->ch_epg_cur_event;
|
||||
if(e == NULL)
|
||||
|
@ -117,7 +115,6 @@ autorec_check_new_ar(autorec_t *ar)
|
|||
if(autorec_cmp(ar, e))
|
||||
autorec_tag(ar, e);
|
||||
}
|
||||
epg_unlock();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -259,8 +259,6 @@ dvb_eit_callback(th_dvb_mux_instance_t *tdmi, uint8_t *ptr, int len,
|
|||
if(ch == NULL)
|
||||
return;
|
||||
|
||||
epg_lock();
|
||||
|
||||
while(len >= 12) {
|
||||
event_id = ptr[0] << 8 | ptr[1];
|
||||
start_time = dvb_convert_date(&ptr[2]);
|
||||
|
@ -311,8 +309,6 @@ dvb_eit_callback(th_dvb_mux_instance_t *tdmi, uint8_t *ptr, int len,
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
epg_unlock();
|
||||
}
|
||||
|
||||
|
||||
|
|
23
epg.c
23
epg.c
|
@ -34,25 +34,11 @@
|
|||
|
||||
#define EPG_HASH_ID_WIDTH 256
|
||||
|
||||
static pthread_mutex_t epg_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
struct event_list epg_hash[EPG_HASH_ID_WIDTH];
|
||||
static dtimer_t epg_channel_maintain_timer;
|
||||
|
||||
epg_content_group_t *epg_content_groups[16];
|
||||
|
||||
void
|
||||
epg_lock(void)
|
||||
{
|
||||
pthread_mutex_lock(&epg_mutex);
|
||||
}
|
||||
|
||||
void
|
||||
epg_unlock(void)
|
||||
{
|
||||
pthread_mutex_unlock(&epg_mutex);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
epg_event_set_title(event_t *e, const char *title)
|
||||
{
|
||||
|
@ -429,8 +415,6 @@ epg_channel_maintain(void *aux, int64_t clk)
|
|||
|
||||
now = dispatch_clock;
|
||||
|
||||
epg_lock();
|
||||
|
||||
LIST_FOREACH(ch, &channels, ch_global_link) {
|
||||
|
||||
/* Age out any old events */
|
||||
|
@ -458,9 +442,6 @@ epg_channel_maintain(void *aux, int64_t clk)
|
|||
|
||||
epg_locate_current_event(ch, now);
|
||||
}
|
||||
|
||||
epg_unlock();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -475,9 +456,6 @@ epg_transfer_events(th_channel_t *ch, struct event_queue *src,
|
|||
event_t *e;
|
||||
int cnt = 0;
|
||||
|
||||
epg_lock();
|
||||
|
||||
|
||||
if(strcmp(icon ?: "", ch->ch_icon ?: "")) {
|
||||
free(ch->ch_icon);
|
||||
ch->ch_icon = icon ? strdup(icon) : NULL;
|
||||
|
@ -491,7 +469,6 @@ epg_transfer_events(th_channel_t *ch, struct event_queue *src,
|
|||
e->e_content_type);
|
||||
cnt++;
|
||||
}
|
||||
epg_unlock();
|
||||
}
|
||||
|
||||
static const char *groupnames[16] = {
|
||||
|
|
4
epg.h
4
epg.h
|
@ -23,10 +23,6 @@ extern epg_content_group_t *epg_content_groups[16];
|
|||
|
||||
void epg_init(void);
|
||||
|
||||
void epg_lock(void);
|
||||
|
||||
void epg_unlock(void);
|
||||
|
||||
event_t *epg_event_find_by_time0(struct event_queue *q, time_t start);
|
||||
|
||||
event_t *epg_event_find_by_time(th_channel_t *ch, time_t start);
|
||||
|
|
|
@ -323,8 +323,6 @@ cr_event_info(client_t *c, char **argv, int argc)
|
|||
if(argc < 2)
|
||||
return 1;
|
||||
|
||||
epg_lock();
|
||||
|
||||
if(!strcasecmp(argv[0], "tag"))
|
||||
e = epg_event_find_by_tag(atoi(argv[1]));
|
||||
if(!strcasecmp(argv[0], "now"))
|
||||
|
@ -335,7 +333,6 @@ cr_event_info(client_t *c, char **argv, int argc)
|
|||
e = epg_event_find_by_time(ch, atoi(argv[2]));
|
||||
|
||||
if(e == NULL) {
|
||||
epg_unlock();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -367,7 +364,6 @@ cr_event_info(client_t *c, char **argv, int argc)
|
|||
next,
|
||||
pvrr != NULL ? pvrr->pvrr_status : HTSTV_PVR_STATUS_NONE);
|
||||
|
||||
epg_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -383,17 +379,13 @@ cr_event_record(client_t *c, char **argv, int argc)
|
|||
if(argc < 1)
|
||||
return 1;
|
||||
|
||||
epg_lock();
|
||||
|
||||
e = epg_event_find_by_tag(atoi(argv[0]));
|
||||
if(e == NULL) {
|
||||
epg_unlock();
|
||||
return 1;
|
||||
}
|
||||
|
||||
pvr_schedule_by_event(e, "htsclient");
|
||||
|
||||
epg_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
4
rpc.c
4
rpc.c
|
@ -153,8 +153,6 @@ rpc_event_info(rpc_session_t *ses, htsmsg_t *in, void *opaque)
|
|||
out = htsmsg_create();
|
||||
htsmsg_add_u32(out, "seq", ses->rs_seq);
|
||||
|
||||
epg_lock();
|
||||
|
||||
if(htsmsg_get_u32(in, "tag", &u32) >= 0) {
|
||||
e = epg_event_find_by_tag(u32);
|
||||
} else if((s = htsmsg_get_str(in, "channel")) != NULL) {
|
||||
|
@ -204,8 +202,6 @@ rpc_event_info(rpc_session_t *ses, htsmsg_t *in, void *opaque)
|
|||
htsmsg_add_u32(out, "pvrstatus", pvrr->pvrr_status);
|
||||
}
|
||||
|
||||
epg_unlock();
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue