summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2020-02-14 16:46:54 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2020-02-21 04:54:48 +0700
commitdb068b3b1abda1ed1b9a3b4c68901bc130c844e0 (patch)
tree336cf5ce40e864aabc88479450cda75c6b1b1ecc
parent1e2c5d70accdf2228b774c2dae0893c0e8c15650 (diff)
layer23/transceiver: fix: always include command arguments in the response
-rw-r--r--src/host/layer23/src/transceiver/trx.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/host/layer23/src/transceiver/trx.c b/src/host/layer23/src/transceiver/trx.c
index a8f213c7..5b6214ee 100644
--- a/src/host/layer23/src/transceiver/trx.c
+++ b/src/host/layer23/src/transceiver/trx.c
@@ -271,7 +271,7 @@ _trx_ctrl_cmd_settsc(struct trx *trx, const char *cmd, const char *args)
"TRX received SETTSC command ! "
"OpenBTS should be configured to send SETBSIC command !\n");
- return _trx_ctrl_send_resp(trx, cmd, -1, NULL);
+ return _trx_ctrl_send_resp(trx, cmd, -1, "%s", args);
}
static int
@@ -281,13 +281,12 @@ _trx_ctrl_cmd_setbsic(struct trx *trx, const char *cmd, const char *args)
if (bsic >= 64) {
LOGP(DTRX, LOGL_ERROR, "Invalid BSIC received\n");
- return _trx_ctrl_send_resp(trx, cmd, -1, NULL);
+ return _trx_ctrl_send_resp(trx, cmd, -1, "%d", bsic);
}
trx->bsic = bsic;
- /* FIXME: include the arguments in response */
- return _trx_ctrl_send_resp(trx, cmd, 0, NULL);
+ return _trx_ctrl_send_resp(trx, cmd, 0, "%d", bsic);
}
static int
@@ -508,7 +507,7 @@ _trx_ctrl_read_cb(struct osmo_fd *ofd, unsigned int what)
if (!ch->cmd) {
LOGP(DTRX, LOGL_ERROR, "[!] No handlers found for command '%s'. Empty response\n", cmd);
- _trx_ctrl_send_resp(trx, cmd, -1, NULL);
+ _trx_ctrl_send_resp(trx, cmd, -1, args);
}
/* Done ! */