Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SAT>IP client: add sanity check routine (incomplete)
  • Loading branch information
perexg committed Mar 21, 2016
1 parent 7cb9ac2 commit 4e280f9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/input/mpegts/satip/satip_satconf.c
Expand Up @@ -209,6 +209,22 @@ satip_satconf_get_position
* Class definition
* *************************************************************************/

static void
satip_satconf_sanity_check( satip_frontend_t *lfe )
{
satip_satconf_t *sfc;

TAILQ_FOREACH(sfc, &lfe->sf_satconf, sfc_link) {
if (sfc->sfc_network_limit) {
if (lfe->sf_master) {
tvherror("satip", "%s: unable to combine master/slave with network limiter, "
"disabling master", lfe->mi_name);
lfe->sf_master = 0;
}
}
}
}

static const void *
satip_satconf_class_network_get( void *o )
{
Expand Down Expand Up @@ -304,6 +320,7 @@ satip_satconf_class_changed ( idnode_t *in )
{
satip_satconf_t *sfc = (satip_satconf_t*)in;
satip_device_changed(sfc->sfc_lfe->sf_device);
satip_satconf_sanity_check(sfc->sfc_lfe);
}

const idclass_t satip_satconf_class =
Expand Down Expand Up @@ -449,6 +466,7 @@ satip_satconf_create
if (lfe->sf_positions == 0)
for ( ; lfe->sf_positions < def_positions; lfe->sf_positions++)
satip_satconf_create0(lfe, NULL, lfe->sf_positions);
satip_satconf_sanity_check(lfe);
}

static void
Expand Down Expand Up @@ -482,6 +500,7 @@ satip_satconf_updated_positions
sfc = TAILQ_NEXT(sfc, sfc_link);
satip_satconf_destroy0(sfc_old);
}
satip_satconf_sanity_check(lfe);
}

void
Expand Down

0 comments on commit 4e280f9

Please sign in to comment.