Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cwc: flush CWC cache on reconnect
  • Loading branch information
perexg committed Jan 26, 2016
1 parent a5589ea commit c4d4da5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/descrambler.h
Expand Up @@ -164,6 +164,7 @@ void descrambler_notify ( th_descrambler_t *t,
int descrambler_descramble ( struct service *t,
struct elementary_stream *st,
const uint8_t *tsb, int len );
void descrambler_flush_table_data( struct service *t );
int descrambler_open_pid ( struct mpegts_mux *mux, void *opaque, int pid,
descrambler_section_callback_t callback,
struct service *service );
Expand Down
15 changes: 14 additions & 1 deletion src/descrambler/cwc.c
Expand Up @@ -247,7 +247,6 @@ typedef struct cwc {
*/

static void cwc_service_pid_free(cwc_service_t *ct);
static void cwc_service_destroy(th_descrambler_t *td);


/**
Expand Down Expand Up @@ -1026,6 +1025,18 @@ cwc_free_cards(cwc_t *cwc)
}
}

/**
*
*/
static void
cwc_flush_services(cwc_t *cwc)
{
cwc_service_t *ct;

LIST_FOREACH(ct, &cwc->cwc_services, cs_link)
descrambler_flush_table_data(ct->td_service);
}

/**
*
*/
Expand Down Expand Up @@ -1128,6 +1139,8 @@ cwc_session(cwc_t *cwc)
*/
cwc->cwc_retry_delay = 0;

cwc_flush_services(cwc);

/**
* We do all requests from now on in a separate thread
*/
Expand Down
2 changes: 1 addition & 1 deletion src/descrambler/descrambler.c
Expand Up @@ -542,7 +542,7 @@ descrambler_keys ( th_descrambler_t *td, int type,
#endif
}

static void
void
descrambler_flush_table_data( service_t *t )
{
mpegts_service_t *ms = (mpegts_service_t *)t;
Expand Down

0 comments on commit c4d4da5

Please sign in to comment.