Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp813172ybg; Tue, 9 Jun 2020 13:34:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwN+WP0mrnkgILUvyEdg3zYSxp8ya4GSV+92tzywb3P+anD1RCc6bxBYhfuAePqmJnXgq1 X-Received: by 2002:a17:906:2656:: with SMTP id i22mr141477ejc.397.1591734886162; Tue, 09 Jun 2020 13:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591734886; cv=none; d=google.com; s=arc-20160816; b=QrCI0xyVGvApv98eN+xN8reLWxex03HDhXd9lWnQrqHUKtIUXZYwql/XvXSzvu7H8j qkFfWVaMMBxMpsdD544vgxzXTEsiOaS/bkCXbnw9O/nRNVsymfVidq9RGbk+QspLZX3n EHmJC24vpnJj54YgrXSrAmGbkPuu/o+t8FmgSTb8Jp9/UzbDgdDl4ifCrGN6Mu2rcjW6 ryE8sLZnQETQEsmybvtb886l15I0SPdaaE8YkoSfjRPuiPJx2nCSexOMBbTrV9/mF50b zjhFL5B7A1s0c5z+yyblgaRpcI8GBBmYk1T7h/hMlEsjmVoPyWkuRT5zJ8LrWMvEORUY Sgpw== 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=4Z+Cf/fSu37n4pffcpX8bwWTES4iSzjSl0xZZBEKBPo=; b=oGbU0dYBcV5Y7174R3zEyIzix/DCg8gY1TgT/KV/i1IuUnPisIDWlhGdP2B6ch61Z+ Y+37JHyeZhHx1W1EYWHvCRKK4bmKN6+1gIuxEjHyaiBOyYLiKUh7yWYW7sq2DSONm9SL e4ZCY17H8htxhPbVkL5m10YVjkmECXaHMpoDMdF2wSXaDX3eCZ7+EQhfA2ethF0CH33A 9e1dYWRVMnoiCTny3v7nDwYqagT4VlC6+ijuyewG485yBBdN1hZKe/7cOSRcUb9vm11z ROPSbEhf0YfdTiCsrVchXbfGSOdruK/A09vYMzVc+vbPygpw6ZYlqmzGDYRphDya/xe/ x7Fg== 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 z12si11250361eju.555.2020.06.09.13.34.04; Tue, 09 Jun 2020 13:34:46 -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 S2389152AbgFITKS (ORCPT + 99 others); Tue, 9 Jun 2020 15:10:18 -0400 Received: from mga02.intel.com ([134.134.136.20]:40922 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389150AbgFITKR (ORCPT ); Tue, 9 Jun 2020 15:10:17 -0400 IronPort-SDR: +Gnpn8JxB6wCqJEDeJuYxLyTztyZbOBDZlr40rEZOIUvhftPK7CgpYWP7K/sHwdbCuHBfKjhIL OfOUgc8zwTSw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2020 12:10:17 -0700 IronPort-SDR: NW+9s45V0e8CDq8WZSv6PJCD+YYLAoC5QlwIQ8q6knKCHQmc/aQC/4uRjtRwtwA2fKAK13nSsp 1b3UFy+s+ZgQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,493,1583222400"; d="scan'208";a="259071176" Received: from rpedgeco-mobl.amr.corp.intel.com (HELO ingas-nuc1.sea.intel.com) ([10.255.229.21]) by fmsmga007.fm.intel.com with ESMTP; 09 Jun 2020 12:10:16 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, przemyslaw.fierek@silvair.com, Inga Stotland Subject: [PATCH BlueZ v2 0/4] Put safeguards around Leave & Attach calls Date: Tue, 9 Jun 2020 12:10:11 -0700 Message-Id: <20200609191015.18459-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 (4): mesh: Make "Busy" and "InProgress" to be distinct errors mesh: Add destroy callback to dbus_send_with_timeout() mesh: Add timeout to a get managed objects call mesh: Add "node is busy" check for Leave() & Attach() doc/mesh-api.txt | 5 +++- mesh/dbus.c | 14 ++++++++--- mesh/dbus.h | 1 + mesh/error.h | 1 + mesh/manager.c | 11 ++++----- mesh/mesh.c | 22 +++++++++++------ mesh/node.c | 64 +++++++++++++++++++++++++++++++----------------- mesh/node.h | 1 + test/test-mesh | 2 -- 9 files changed, 78 insertions(+), 43 deletions(-) -- 2.26.2