Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
subscriptions: add SM_CODE_NO_ADAPTERS, fixes #3358
  • Loading branch information
perexg committed Nov 30, 2015
1 parent fbcd414 commit 00eff4b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/epggrab/otamux.c
Expand Up @@ -556,10 +556,14 @@ epggrab_ota_kick_cb ( void *p )
SUBSCRIPTION_EPG |
SUBSCRIPTION_ONESHOT |
SUBSCRIPTION_TABLES))) {
TAILQ_INSERT_TAIL(&epggrab_ota_pending, om, om_q_link);
om->om_q_type = EPGGRAB_OTA_MUX_PENDING;
if (r == SM_CODE_NO_FREE_ADAPTER)
if (r != SM_CODE_NO_ADAPTERS) {
TAILQ_INSERT_TAIL(&epggrab_ota_pending, om, om_q_link);
om->om_q_type = EPGGRAB_OTA_MUX_PENDING;
if (r == SM_CODE_NO_FREE_ADAPTER)
net->failed = 1;
} else {
net->failed = 1;
}
if (first == NULL)
first = om;
} else {
Expand Down
1 change: 1 addition & 0 deletions src/htsp_server.c
Expand Up @@ -3872,6 +3872,7 @@ _htsp_get_subscription_status(int smcode)
{
case SM_CODE_NOT_FREE:
case SM_CODE_NO_FREE_ADAPTER:
case SM_CODE_NO_ADAPTERS:
return "noFreeAdapter";
case SM_CODE_NO_DESCRAMBLER:
return "scrambled";
Expand Down
2 changes: 1 addition & 1 deletion src/input/mpegts/mpegts_network_scan.c
Expand Up @@ -66,7 +66,7 @@ mpegts_network_scan_timer_cb ( void *p )
assert(mm->mm_scan_state == MM_SCAN_STATE_PEND);

/* No free tuners - stop */
if (r == SM_CODE_NO_FREE_ADAPTER)
if (r == SM_CODE_NO_FREE_ADAPTER || r == SM_CODE_NO_ADAPTERS)
break;

/* No valid tuners (subtly different, might be able to tuner a later
Expand Down
6 changes: 6 additions & 0 deletions src/service.c
Expand Up @@ -706,6 +706,12 @@ service_find_instance
service_instance_destroy(sil, si);
}

if (TAILQ_EMPTY(sil)) {
if (*error < SM_CODE_NO_ADAPTERS)
*error = SM_CODE_NO_ADAPTERS;
return NULL;
}

/* Debug */
TAILQ_FOREACH(si, sil, si_link) {
const char *name = ch ? channel_get_name(ch) : NULL;
Expand Down
2 changes: 2 additions & 0 deletions src/streaming.c
Expand Up @@ -441,6 +441,8 @@ streaming_code2txt(int code)
return N_("No source available");
case SM_CODE_NO_SERVICE:
return N_("No service assigned to channel");
case SM_CODE_NO_ADAPTERS:
return N_("No assigned adapters");

case SM_CODE_ABORTED:
return N_("Aborted by user");
Expand Down
1 change: 1 addition & 0 deletions src/tvheadend.h
Expand Up @@ -467,6 +467,7 @@ typedef enum {
#define SM_CODE_NO_SOURCE 206
#define SM_CODE_NO_SERVICE 207
#define SM_CODE_NO_VALID_ADAPTER 208
#define SM_CODE_NO_ADAPTERS 209

#define SM_CODE_ABORTED 300

Expand Down

0 comments on commit 00eff4b

Please sign in to comment.