Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp601844pxa; Tue, 11 Aug 2020 10:21:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxh+h1IpaKZNvsorpAB570dIc+pv2VTCZQVhpEHL8PczExgLKHQPLE9PApcGccLaFLxcz0 X-Received: by 2002:a17:906:b89a:: with SMTP id hb26mr12536282ejb.425.1597166463721; Tue, 11 Aug 2020 10:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597166463; cv=none; d=google.com; s=arc-20160816; b=gl4N9G8Iaa387nKvaroc8M777l/DbqPzI0vXwT3Oyx6TI4F0JV4iR2vtY5LNLY9O+O e81L33jc7Eeh8OqcjIcEFRSy3YiwXZE49G9hvIg0KCKNxfur4tyamWtebkntCTR3FHm4 aocoeJxovI3xl1IEKQgMXJ8qRINGEbc0zUyOaj78LOS14hd7cWmSSrKVz00c/4ry5UX3 +MBLyovK+6rBD6JHbfgCdq9jXCKCBOBPueB7fARW0rOMWhAmQhOOyOkGg5A5fvyhi5nh G+GFEv2TQSvfXUSdKsb5hw63o7DxIcvQu1IlPCXzKSufA9rka3tIXzaZ3YVeX4SI6YOH whFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=zDXeTp+8gyvkOmuPbcM0mjkvV0zz8cNKD9QV94B/Yh8=; b=Tdx/dz4zLggYWDR54iPtvli8XjCcOWvM8TCVNLwTnZafADMgEBtK+SpcaiDnTC5qGn SSHsy4E/oZVt3xvbQ8D6Qp+jxMX1zV4HQW7znhYl16I3OvMABAo9/K6Y7BMZTeCITTbM tZdUbED4hxvz+XL52ZzRhv6q5EvP2WaRFVt+cAjh8+Q0lVmV45f6AxRUxiC9hYBo//hQ /NSgmz6+WewtRoye+iiHyWESkJIED22VcvQ8r8FCIVX7+0+htUGLfsaoFT4g7LLOWcCV 45+e09iQn3w5f+VxVeBCyn++0Wmcz2Jk4I6N0hCLSNpGvi+bQCdKL+GiamZ/OiVjdzvR Z0dg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i21si11972741ejz.395.2020.08.11.10.20.30; Tue, 11 Aug 2020 10:21:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729150AbgHKRS5 (ORCPT + 99 others); Tue, 11 Aug 2020 13:18:57 -0400 Received: from mga12.intel.com ([192.55.52.136]:29208 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728990AbgHKRS4 (ORCPT ); Tue, 11 Aug 2020 13:18:56 -0400 IronPort-SDR: FTTwAgxCnOHpAmwMo30QWOxkJETx7NmEx0hUjvdGx0FJjBFntMZEY6LBUU0g9lvMJ+QfKcHTKF N5/iPvoGq7bQ== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="133316706" X-IronPort-AV: E=Sophos;i="5.76,301,1592895600"; d="scan'208";a="133316706" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 10:18:56 -0700 IronPort-SDR: fWSOwbyptCKZ1TxnwTe4+YxCJ6GcdyzbB5VEqmPjOv3P/vgKyTqShCyxa8rOE6YACOcAlHvuQt e3JK3tZShC1Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,301,1592895600"; d="scan'208";a="369010868" Received: from rajkumar-mobl.amr.corp.intel.com (HELO ingas-nuc1.intel.com) ([10.254.82.230]) by orsmga001.jf.intel.com with ESMTP; 11 Aug 2020 10:18:55 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ] mesh: Fix logic error when saving model subscriptions Date: Tue, 11 Aug 2020 10:18:55 -0700 Message-Id: <20200811171855.13189-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This fixes opcode check condition when saving configuration for model subscriptions: use || instead of && for opcode checking --- mesh/cfgmod-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesh/cfgmod-server.c b/mesh/cfgmod-server.c index d31c8d99f..9da981700 100644 --- a/mesh/cfgmod-server.c +++ b/mesh/cfgmod-server.c @@ -211,7 +211,7 @@ static bool save_cfg_sub(struct mesh_node *node, uint16_t ele_addr, if (virt) memcpy(db_sub.addr.label, label, 16); - if (opcode == OP_CONFIG_MODEL_SUB_VIRT_DELETE && + if (opcode == OP_CONFIG_MODEL_SUB_VIRT_DELETE || opcode == OP_CONFIG_MODEL_SUB_DELETE) return mesh_config_model_sub_del(cfg, ele_addr, id, vendor, &db_sub); -- 2.26.2