mesh: Add deferral of Attach() and Leave() if busy
authorBrian Gix <brian.gix@intel.com>
Tue, 16 Jun 2020 18:14:36 +0000 (11:14 -0700)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Mon, 28 Dec 2020 06:20:04 +0000 (11:50 +0530)
commit59aca76bf032c9810a821142208efe12f082e901
treedd1432be00511702875d0263251a13e854517878
parenta9484d7a8cdf4a92c4340faae08546c89e7649e6
mesh: Add deferral of Attach() and Leave() if busy

We require the successful return of JoinComplete() method before
handling subsequent Attach() or Leave() method calls. To simplify the
construction of Applications, we will accept one of these calls up to 1
second prior to receiving the final return status of JoinComplete,
which tells us that the Application is ready to use the node.

If the node is still not ready after the deferral, Attach and/or Leave
will fail.

Change-Id: I874b8f8243d17f862fbaa0f7b91b7b1fc627c137
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
mesh/mesh.c