Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp669112ybg; Wed, 10 Jun 2020 10:27:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztN2suZRyqAJ4U2GHhRsikYD0Y4+KQ0geXDeoR5f6aAPMwFmasl0sdZc6lVsFEfJit16vU X-Received: by 2002:a17:906:7848:: with SMTP id p8mr4684104ejm.244.1591810057148; Wed, 10 Jun 2020 10:27:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591810057; cv=none; d=google.com; s=arc-20160816; b=v7Im4zzWM47FyqBUr9cY3VTk3QfTGbaAu+ec7NmdRZEEfvRH4HsTXyseriwjj6GVfX UDEjFqIEY/dLlcbyluDwEekzpwvvhjFolagNDmzc39iW63GjGw224KwrLdu/PHUMzjFO m+ya2Fp79Kc49UkhGUhYYswX9wyDL9I+UOg2ZeBljzeRIMvZbbSkQQuPBhT3F0j4HJBG KL4zNWSxiaNOAmHFMWTkfDpn4wLu4wde7r5vkksyD93ypmTCrZJ1aNF1nUlMsBeObCVT OgwpfhcDOfnKCB4+T0c/066X1MXq5CZRN7xJOeZeBYh5TDRSHH4ZDPEsRLq/ZYmBX/9R GzCQ== 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=p3U3CqO8e1n33q+I5k9FDYxLXjjsvox+kXEx75/pNfQ=; b=Ne762fyiFlLeQMzYxAJMqBd36T7Ze9xPTQ28XET7rYer5NDWHufT1diO29SoA2MwT1 xVUSn/4wgvxsjhOOiuhTumgOyXAOs5DenDe6KsXB4wnfTb2maksbVRPMQp1/QGuSA0OM 2Ym5AuJCvcunWgcdDakJgfvYni+VxrDEw2NMbip4eo3FrxZFbyqv5hlaZ3qbgMaUIMS7 bMtcYmJ/GSTwVDIJPDAy5nR8vKLwi6lp9c/a82Mx0DSTJ07SDkS9Pg2VPjmSkwcjdLYu NWl8oQNVSn/AqRkArLgnavMWIzVfZzCFeAMsb/RF/xiKPzeYLNPs/CNi4Cm3gH+JbPWF pHrA== 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 a17si357328eju.694.2020.06.10.10.27.12; Wed, 10 Jun 2020 10:27:37 -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 S1728481AbgFJRLY (ORCPT + 99 others); Wed, 10 Jun 2020 13:11:24 -0400 Received: from mga07.intel.com ([134.134.136.100]:8721 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728251AbgFJRLY (ORCPT ); Wed, 10 Jun 2020 13:11:24 -0400 IronPort-SDR: v5chk+g8PYqAQscdMNFAb1Z0cuPN4ZSdm5aCx7wgA3/8/hKy2s+Q1jVznyelKt5EkRn0OEImjp 3wIN0DboR6Qg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2020 10:11:23 -0700 IronPort-SDR: HVO0zgmboEPC1aR2qnGr9j6MAeB5H/QhZQf81t9PGwz6BtnstjWfGu6HH3UG2V5e3stf9HOJlX 8LhvKOricv2Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,496,1583222400"; d="scan'208";a="259340075" Received: from unknown (HELO ingas-nuc1.sea.intel.com) ([10.254.72.48]) by fmsmga007.fm.intel.com with ESMTP; 10 Jun 2020 10:11:22 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ v3 0/5] Put safeguards around Leave & Attach calls Date: Wed, 10 Jun 2020 10:11:16 -0700 Message-Id: <20200610171121.46910-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 set of patches addresses the situation when an application calls Leave() or Attach() methods on a node that has another incomplete method call on Network interface associated with it. The simple solution is to return error in response to Leave() method if an application still owes the daemon either a reply to GetManagedObjects request in case of Attach() or a reply to JoinComplete() in case of Join(), Create() or Import() Similarly, a "Busy" error is returned in response to Attach() method if an application still owes the daemon a reply to JoinComplete() in case of pending Join(), Create() or Import() Inga Stotland (5): mesh: Delete unused function mesh: Make "Busy" and "InProgress" to be distinct errors mesh: Add destroy callback to dbus_send_with_timeout() mesh: Add timeout to GetManagedObjects call mesh: Add "node is busy" check for Leave() & Attach() doc/mesh-api.txt | 5 +++- mesh/dbus.c | 10 +++++++- mesh/dbus.h | 1 + mesh/error.h | 1 + mesh/manager.c | 11 ++++----- mesh/mesh.c | 22 +++++++++++------ mesh/node.c | 63 +++++++++++++++++++++++++++++------------------- mesh/node.h | 2 +- test/test-mesh | 2 -- 9 files changed, 74 insertions(+), 43 deletions(-) -- 2.26.2