mbox series

[BlueZ,v3,0/5] Put safeguards around Leave & Attach calls

Message ID 20200610171121.46910-1-inga.stotland@intel.com (mailing list archive)
Headers show
Series Put safeguards around Leave & Attach calls | expand

Message

Stotland, Inga June 10, 2020, 5:11 p.m. UTC
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(-)

Comments

Brian Gix June 10, 2020, 5:42 p.m. UTC | #1
Patchset Applied

On Wed, 2020-06-10 at 10:11 -0700, Inga Stotland wrote:
> 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(-)
>