From 28694ca39b426c900b3228eef4373bf6af44fe08 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Thu, 12 Jul 2018 21:35:16 -0700 Subject: [PATCH] diag_cntl: Only set REQ_RSP feature if we have cmd channel Signed-off-by: Bjorn Andersson --- router/diag_cntl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/router/diag_cntl.c b/router/diag_cntl.c index 126c955..ad0fa76 100644 --- a/router/diag_cntl.c +++ b/router/diag_cntl.c @@ -257,7 +257,8 @@ static int diag_cntl_feature_mask(struct peripheral *peripheral, local_mask |= DIAG_FEATURE_FEATURE_MASK_SUPPORT; local_mask |= DIAG_FEATURE_DIAG_MASTER_SETS_COMMON_MASK; - local_mask |= DIAG_FEATURE_REQ_RSP_SUPPORT; + if (peripheral->cmd_fd >= 0) + local_mask |= DIAG_FEATURE_REQ_RSP_SUPPORT; local_mask |= DIAG_FEATURE_APPS_HDLC_ENCODE; if (peripheral->sockets) local_mask |= DIAG_FEATURE_SOCKETS_ENABLED;