aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-06-20 17:46:27 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-06-20 18:17:34 +0200
commit6ebabb560e9a7843715b8c14c9bedee5c0dc1ee2 (patch)
tree27ab485fc687039d5ed6f63c0e2b2ac4c7147ec6
parentd98f2f35ec7c4fd449323f970ffd8ede11b41038 (diff)
sysmobts: Do not write "trx-calibration-path (null)" in the config file
When not specifying a config path, then saving the running config it would end up as "(null)" and then leads to an error like this: <0006> calib_file.c:147 Failed to open '(null)/calib_rxu_850.cfg' for calibration data. Add a NULL check to avoid this issue when writing the config file.
-rw-r--r--src/osmo-bts-sysmo/sysmobts_vty.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c
index 0ecf5858..4993c51d 100644
--- a/src/osmo-bts-sysmo/sysmobts_vty.c
+++ b/src/osmo-bts-sysmo/sysmobts_vty.c
@@ -448,8 +448,9 @@ void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
vty_out(vty, " clock-calibration %d%s", fl1h->clk_cal,
VTY_NEWLINE);
- vty_out(vty, " trx-calibration-path %s%s", fl1h->calib_path,
- VTY_NEWLINE);
+ if (fl1h->calib_path)
+ vty_out(vty, " trx-calibration-path %s%s",
+ fl1h->calib_path, VTY_NEWLINE);
vty_out(vty, " clock-source %s%s",
get_value_string(femtobts_clksrc_names, fl1h->clk_src),
VTY_NEWLINE);