Some minor corrections to new ota code.
This commit is contained in:
parent
c236ba70df
commit
903ef7d3a7
5 changed files with 13 additions and 6 deletions
|
@ -289,6 +289,8 @@ dvb_mux_create(th_dvb_adapter_t *tda, const struct dvb_mux_conf *dmc,
|
|||
mux_link_initial(tda, tdmi);
|
||||
}
|
||||
|
||||
TAILQ_INIT(&tdmi->tdmi_epg_grab);
|
||||
|
||||
return tdmi;
|
||||
}
|
||||
|
||||
|
|
|
@ -308,6 +308,10 @@ void epggrab_resched ( void )
|
|||
*/
|
||||
void epggrab_init ( void )
|
||||
{
|
||||
/* Lists */
|
||||
extern TAILQ_HEAD(, epggrab_ota_mux) ota_mux_all;
|
||||
TAILQ_INIT(&ota_mux_all);
|
||||
|
||||
/* Initialise modules */
|
||||
eit_init();
|
||||
xmltv_init();
|
||||
|
|
|
@ -487,6 +487,7 @@ epggrab_module_ota_t *epggrab_module_ota_create
|
|||
skel->type = EPGGRAB_OTA;
|
||||
skel->enable = enable;
|
||||
skel->start = start;
|
||||
TAILQ_INIT(&skel->muxes);
|
||||
|
||||
return skel;
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ typedef struct opentv_dict
|
|||
/* Provider configuration */
|
||||
typedef struct opentv_module_t
|
||||
{
|
||||
epggrab_module_t ; ///< Base struct
|
||||
epggrab_module_ota_t ; ///< Base struct
|
||||
|
||||
int nid;
|
||||
int tsid;
|
||||
|
@ -505,7 +505,7 @@ static int _opentv_bat_section
|
|||
* Table Callbacks
|
||||
* ***********************************************************************/
|
||||
|
||||
static epggrab_ota_mux_t *_opentv_table_callback
|
||||
static epggrab_ota_mux_t *_opentv_event_callback
|
||||
( th_dvb_mux_instance_t *tdmi, uint8_t *buf, int len, uint8_t tid, void *p )
|
||||
{
|
||||
th_dvb_table_t *tdt = (th_dvb_table_t*)p;
|
||||
|
@ -568,7 +568,7 @@ static epggrab_ota_mux_t *_opentv_table_callback
|
|||
static int _opentv_title_callback
|
||||
( th_dvb_mux_instance_t *tdmi, uint8_t *buf, int len, uint8_t tid, void *p )
|
||||
{
|
||||
epggrab_ota_mux_t *ota = _opentv_table_callback(tdmi, buf, len, tid, p);
|
||||
epggrab_ota_mux_t *ota = _opentv_event_callback(tdmi, buf, len, tid, p);
|
||||
if (ota)
|
||||
return _opentv_parse_event_section((opentv_module_t*)ota->grab,
|
||||
(opentv_status_t*)ota->status,
|
||||
|
@ -579,7 +579,7 @@ static int _opentv_title_callback
|
|||
static int _opentv_summary_callback
|
||||
( th_dvb_mux_instance_t *tdmi, uint8_t *buf, int len, uint8_t tid, void *p )
|
||||
{
|
||||
epggrab_ota_mux_t *ota = _opentv_table_callback(tdmi, buf, len, tid, p);
|
||||
epggrab_ota_mux_t *ota = _opentv_event_callback(tdmi, buf, len, tid, p);
|
||||
if (ota)
|
||||
return _opentv_parse_event_section((opentv_module_t*)ota->grab,
|
||||
(opentv_status_t*)ota->status,
|
||||
|
|
|
@ -72,7 +72,7 @@ int epggrab_mux_period ( th_dvb_mux_instance_t *tdmi )
|
|||
int period = 0;
|
||||
epggrab_ota_mux_t *ota;
|
||||
TAILQ_FOREACH(ota, &tdmi->tdmi_epg_grab, tdmi_link) {
|
||||
if (!ota->is_reg) break;
|
||||
if (!ota->is_reg) continue;
|
||||
if (ota->timeout > period)
|
||||
period = ota->timeout;
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ epggrab_ota_mux_t *epggrab_ota_create
|
|||
} else {
|
||||
time_t now;
|
||||
time(&now);
|
||||
if (ota) ota->state = EPGGRAB_OTA_MUX_IDLE;
|
||||
ota->state = EPGGRAB_OTA_MUX_IDLE;
|
||||
|
||||
/* Blocked */
|
||||
if (epggrab_ota_is_blocked(ota)) ota = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue