diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-05-30 12:42:31 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-05-30 15:29:01 +0200 |
commit | a7f9b58e44fa7119e7113269765302a0b8a619d5 (patch) | |
tree | d675e66ab1ec23e51b46e5499d5ce94531c303fb /src/osmo-bts-sysmo | |
parent | 0e2b6244184a1c030252667765a0587073575d23 (diff) |
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.
Diffstat (limited to 'src/osmo-bts-sysmo')
-rw-r--r-- | src/osmo-bts-sysmo/misc/sysmobts_mgr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c index 6c64d0f2..942b18aa 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c @@ -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, |