From ca5eee6e3f50704e69507f41523ab885be7a58fb Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 14 Jul 2017 03:19:13 +0700 Subject: 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 --- src/host/trxcon/trx_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/host/trxcon/trx_if.c') 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); -- cgit v1.2.3