Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3221463ybx; Fri, 8 Nov 2019 16:07:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwzaFvsfMeuYWZo1HrELfOrsNEMQ9eWnRswrtpsKD/0/z8Ikwiu8SIymta3IRZz8oUYfEpd X-Received: by 2002:a05:6402:70e:: with SMTP id w14mr13458804edx.95.1573258068983; Fri, 08 Nov 2019 16:07:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573258068; cv=none; d=google.com; s=arc-20160816; b=wTDEBM4EVQ5emmuVnapzl8zSuaBmdJw6WbVrR7p0PeotahMbxwxo3+Muuv3NfSkDop /rPxb+c7u9egXdym3+mpjztWGWzDVdsGuJTXefmG/RjGpQV+Zt83SV/R00gKh2RQNB0V S/sVVGAKB2TGiiNFVAxlolal+9fKN9qpAC4wNKHCMfKy1HLXsrwTIWzonqHVQ1DJofB/ DK56K7VvdUhqB6k7Mf6Nw8QQRYw6pFmdm/F4dBBTifVf0rzdDVXm/RPs5uucKP78/Ph/ AIQog5043QVOfWP7rNQyZPv2LZcbTZU80RbZD51KRxH4RiuYBHRgJAdGpPLDUYAHFm3o fLdg== 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; bh=CcB5VzDCwpCfl6yXbwtUncJ+3yBdsmCt76rPXtt+QkM=; b=yhq2QDHtrQaypHQ1GKmGYvWXuZtHKVKuFUOj2mnDdKcucpF55h0vm7ARFYZa9+awuW 7L8NWwsSAXkw1OpDmgUEPFzOCKUthKicJ7du9Zc2NHHwuVJgDWnRHH0fAFzu0U77SEC9 9bnTiNyiNSNO3Fe4AiQ7/cLgsdbLNKE5kkiQs11jSx1T1qg6UjhpEYH1M1LIIaXgxLUl 5B6pUNKNubHjR6LIk1yqw/YUqmH0DvQYnBKiO/nz88StDdq2MIRIJC4oFq4y6KhBBIXs 67iUxPj60EdOfqAjkQ+67QeQ2BSdiAwXIVLeqCP15UNL60DUpdBNRoWCFRRmdDc9jDlF MQGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id fy3si4591117ejb.267.2019.11.08.16.07.06; Fri, 08 Nov 2019 16:07:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 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 S1726394AbfKIAHD (ORCPT + 99 others); Fri, 8 Nov 2019 19:07:03 -0500 Received: from mga05.intel.com ([192.55.52.43]:64720 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbfKIAHD (ORCPT ); Fri, 8 Nov 2019 19:07:03 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2019 16:07:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,283,1569308400"; d="scan'208";a="215104646" Received: from ingas-nuc1.sea.intel.com ([10.254.33.193]) by orsmga002.jf.intel.com with ESMTP; 08 Nov 2019 16:07:01 -0800 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ] mesh: Fix clean up after AddNode method Date: Fri, 8 Nov 2019 16:07:00 -0800 Message-Id: <20191109000700.5428-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.21.0 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 the cleanup routine that is called after AddNode method on org.bluez.mesh.Manager1 interface is complete: do not remove the agent associated with the Provisioner (owner of Manager interface). --- mesh/manager.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mesh/manager.c b/mesh/manager.c index b39ea6ed7..0b11b4541 100644 --- a/mesh/manager.c +++ b/mesh/manager.c @@ -80,8 +80,6 @@ static void free_pending_add_call() l_dbus_remove_watch(dbus_get_bus(), add_pending->disc_watch); - mesh_agent_remove(add_pending->agent); - l_free(add_pending); add_pending = NULL; } @@ -246,7 +244,7 @@ static struct l_dbus_message *add_node_call(struct l_dbus *dbus, add_pending = l_new(struct add_data, 1); memcpy(add_pending->uuid, uuid, 16); add_pending->node = node; - add_pending->agent = node_get_agent(node);; + add_pending->agent = node_get_agent(node); if (!node_is_provisioner(node) || (add_pending->agent == NULL)) { l_info("Provisioner: %d", node_is_provisioner(node)); -- 2.21.0