From: Jaroslav Kysela Date: Mon, 21 Mar 2016 19:51:52 +0000 (+0100) Subject: SAT>IP client: add sanity check routine (incomplete) X-Git-Tag: v4.2.1~828 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e280f92fa761d7eae0368823f0e3c1046c9b8f3;p=thirdparty%2Ftvheadend.git SAT>IP client: add sanity check routine (incomplete) --- diff --git a/src/input/mpegts/satip/satip_satconf.c b/src/input/mpegts/satip/satip_satconf.c index 5699c2346..1ea0a1daa 100644 --- a/src/input/mpegts/satip/satip_satconf.c +++ b/src/input/mpegts/satip/satip_satconf.c @@ -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 ) { @@ -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 = @@ -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 @@ -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