--- mcap/mcap.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/mcap/mcap.c b/mcap/mcap.c index 7098a8d..cf92368 100644 --- a/mcap/mcap.c +++ b/mcap/mcap.c @@ -1412,6 +1412,7 @@ static gboolean check_rsp(struct mcap_mcl *mcl, uint8_t *cmd, uint32_t len) mcap4B_rsp *rsp; GError *gerr = NULL; + rsp = (mcap4B_rsp *)cmd; /* Check if the response matches with the last request */ if ((cmd[0] != MCAP_ERROR_RSP) && ((mcl->lcmd[0] + 1) != cmd[0])) goto close_mcl; @@ -1419,8 +1420,6 @@ static gboolean check_rsp(struct mcap_mcl *mcl, uint8_t *cmd, uint32_t len) if (len < 4) goto close_mcl; - rsp = (mcap4B_rsp *)cmd; - if (rsp->rc == MCAP_REQUEST_NOT_SUPPORTED) { DBG("Remote does not support opcodes"); g_set_error(&gerr, MCAP_ERROR, MCAP_ERROR_REQUEST_NOT_SUPPORTED, -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html