summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-07-14 03:19:13 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-10-23 22:05:49 +0330
commit02b2297015add7fe4bdf881dd7b38c763c846afe (patch)
tree6a0afb6d40b004199c8fc1149cc271d762a275ef /src
parentcdc084e0a7042819c68f11590cd4ee5f0a300d53 (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')
-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);