1
0
mirror of https://github.com/DigitalDevices/octonet.git synced 2023-10-10 13:36:52 +02:00

count frontends after checking config to get right count if internal switch enabled

This commit is contained in:
Ralph Metzler 2016-11-18 13:38:13 +01:00
parent 88574173d9
commit 1fe49c7f2d

View File

@ -1108,16 +1108,6 @@ static int init_fe(struct octoserve *os, int a, int f, int fd, int nodvbt, int m
if (!fe->type) if (!fe->type)
return -1; return -1;
if (fe->type & (1UL << SYS_DVBS2))
os->dvbs2num++;
if (fe->type & (1UL << SYS_DVBT2))
os->dvbt2num++;
else if (fe->type & (1UL << SYS_DVBT))
os->dvbtnum++;
if (fe->type & (1UL << SYS_DVBC2))
os->dvbc2num++;
else if (fe->type & (1UL << SYS_DVBC_ANNEX_A))
os->dvbcnum++;
fe->os = os; fe->os = os;
fe->anum = a; fe->anum = a;
fe->fnum = f; fe->fnum = f;
@ -1142,7 +1132,19 @@ static int init_fe(struct octoserve *os, int a, int f, int fd, int nodvbt, int m
} }
} }
} }
os->dvbfe_num++;
if (fe->type & (1UL << SYS_DVBS2))
os->dvbs2num++;
if (fe->type & (1UL << SYS_DVBT2))
os->dvbt2num++;
else if (fe->type & (1UL << SYS_DVBT))
os->dvbtnum++;
if (fe->type & (1UL << SYS_DVBC2))
os->dvbc2num++;
else if (fe->type & (1UL << SYS_DVBC_ANNEX_A))
os->dvbcnum++;
os->dvbfe_num++;
pthread_mutex_init(&fe->mutex, 0); pthread_mutex_init(&fe->mutex, 0);
return 0; return 0;
} }