summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/trx_if.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-07-14 03:19:13 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-11-19 17:35:07 +0700
commitca5eee6e3f50704e69507f41523ab885be7a58fb (patch)
tree5f37266e28c4b46f5fb66759f621c87843df3004 /src/host/trxcon/trx_if.c
parentd28f65917f0cc9106376020b107086f801fa2613 (diff)
host/trxcon/trx_if.c: simplify response matching
Previously, we had both length and string matching of request and response. To be able to implement commands with additional params in the future, this change drops the length matching part. Change-Id: Id4c50115f5f1b1da450ff8b8dcfd6ccf572d23f5
Diffstat (limited to 'src/host/trxcon/trx_if.c')
-rw-r--r--src/host/trxcon/trx_if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index c387bc19..c66bb4cb 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -458,7 +458,7 @@ static int trx_ctrl_read_cb(struct osmo_fd *ofd, unsigned int what)
struct trx_ctrl_msg, list);
/* Check if response matches command */
- if (rsp_len != tcm->cmd_len || !!strncmp(buf + 4, tcm->cmd + 4, rsp_len)) {
+ if (!!strncmp(buf + 4, tcm->cmd + 4, rsp_len)) {
LOGP(DTRX, (tcm->critical) ? LOGL_FATAL : LOGL_ERROR,
"Response message '%s' does not match command "
"message '%s'\n", buf, tcm->cmd);