43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From a7f9b58e44fa7119e7113269765302a0b8a619d5 Mon Sep 17 00:00:00 2001
|
|
From: Holger Hans Peter Freyther <holger@moiji-mobile.com>
|
|
Date: Fri, 30 May 2014 12:42:31 +0200
|
|
Subject: [PATCH] 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.
|
|
---
|
|
src/osmo-bts-sysmo/misc/sysmobts_mgr.c | 16 ++++++++--------
|
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
Index: git/src/osmo-bts-sysmo/misc/sysmobts_mgr.c
|
|
===================================================================
|
|
--- git.orig/src/osmo-bts-sysmo/misc/sysmobts_mgr.c
|
|
+++ git/src/osmo-bts-sysmo/misc/sysmobts_mgr.c
|
|
@@ -188,16 +188,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;
|
|
+
|
|
trx_nr = val;
|
|
|
|
ucontrol0.fd = osmo_serial_init(ucontrol0.path, 115200);
|