aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs/trx_vty.c
diff options
context:
space:
mode:
authorEric <ewild@sysmocom.de>2023-05-10 23:50:38 +0200
committerEric <ewild@sysmocom.de>2023-07-25 18:25:49 +0200
commit19e134a626abdb99435d96b0bfcc46b0804715e5 (patch)
tree4efee917a966bfc5978fcaf9fed5453b67f0f00f /CommonLibs/trx_vty.c
parenta98521ac056077680dfe693957eda4a8848c9f06 (diff)
transceiver: pass cfg struct instead of args
Passing 7 args is a bit much, just pass the config struct instead. Change-Id: I48386900d15ff4d770c70a4efc246d32f921904b
Diffstat (limited to 'CommonLibs/trx_vty.c')
-rw-r--r--CommonLibs/trx_vty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c
index ba55f92..6724189 100644
--- a/CommonLibs/trx_vty.c
+++ b/CommonLibs/trx_vty.c
@@ -607,7 +607,7 @@ static int config_write_trx(struct vty *vty)
vty_out(vty, " remote-ip %s%s", trx->cfg.remote_addr, VTY_NEWLINE);
if (trx->cfg.base_port != DEFAULT_TRX_PORT)
vty_out(vty, " base-port %u%s", trx->cfg.base_port, VTY_NEWLINE);
- if (trx->cfg.dev_args)
+ if (strlen(trx->cfg.dev_args))
vty_out(vty, " dev-args %s%s", trx->cfg.dev_args, VTY_NEWLINE);
if (trx->cfg.tx_sps != DEFAULT_TX_SPS)
vty_out(vty, " tx-sps %u%s", trx->cfg.tx_sps, VTY_NEWLINE);
@@ -760,6 +760,7 @@ struct trx_ctx *vty_trx_ctx_alloc(void *talloc_ctx)
trx->cfg.rx_sps = DEFAULT_RX_SPS;
trx->cfg.filler = FILLER_ZERO;
trx->cfg.rssi_offset = 0.0f;
+ trx->cfg.dev_args = "";
return trx;
}