capmt: do not duplicate subscribed services

descrambler_service_start() was sometimes called multiple times
resulting in duplicate start of capmt server for the same
service.
This commit is contained in:
Mariusz Bialonczyk 2013-11-19 14:57:44 +01:00
parent 4b3c1dc30f
commit 3c9e815b08

View file

@ -898,6 +898,14 @@ capmt_service_start(service_t *s)
return;
tuner = lfe->lfe_adapter->la_dvb_number;
TAILQ_FOREACH(capmt, &capmts, capmt_link) {
LIST_FOREACH(ct, &capmt->capmt_services, ct_link) {
/* skip, if we already have this service */
if (ct->ct_service == t)
return;
}
}
TAILQ_FOREACH(capmt, &capmts, capmt_link) {
/* skip, if we're not active */
if (!capmt->capmt_enabled)