sysmobts: Fix the initialization of the BTS manager code

The code should only run for the sysmoBTS 2050 and TRX 0.
If the device is not marked as 2050 the code would attempt
to open /dev/ttyS0 and block forever.
This commit is contained in:
Holger Hans Peter Freyther 2014-05-30 12:42:31 +02:00
parent 0e2b624418
commit a7f9b58e44
1 changed files with 8 additions and 8 deletions

View File

@ -83,17 +83,17 @@ static void initialize_sbts2050(void)
return;
}
if (val == 2050) {
if (sysmobts_par_get_int(SYSMOBTS_PAR_TRX_NR, &val) < 0) {
LOGP(DFIND, LOGL_ERROR,
"Failed to get the TRX number\n");
return;
}
if (val != 2050)
return;
if (val != 0)
return;
if (sysmobts_par_get_int(SYSMOBTS_PAR_TRX_NR, &val) < 0) {
LOGP(DFIND, LOGL_ERROR, "Failed to get the TRX number\n");
return;
}
if (val != 0)
return;
ucontrol0.fd = osmo_serial_init(ucontrol0.path, 115200);
if (ucontrol0.fd < 0) {
LOGP(DFIND, LOGL_ERROR,