linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mesh: Clear nodes queue on get_managed_objects_cb() fails
@ 2019-06-28  9:50 Jakub Witowski
  2019-07-01 16:07 ` Gix, Brian
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Witowski @ 2019-06-28  9:50 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Inga Stotland

Currently when the get_managed_objects_cb() fails it frees
the node resources but the node still remains on the "nodes" queue.

This implementation calls node_remove() instead of
free_node_resources()."
---
 mesh/node.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mesh/node.c b/mesh/node.c
index 4e35bb3ff..2229aa711 100644
--- a/mesh/node.c
+++ b/mesh/node.c
@@ -1601,7 +1601,7 @@ fail:
 	} else {
 		/* Handle failed Join and Create requests */
 		if (node)
-			free_node_resources(node);
+			node_remove(node);
 
 		if (req->type == REQUEST_TYPE_JOIN) {
 			node_join_ready_func_t cb = req->cb;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mesh: Clear nodes queue on get_managed_objects_cb() fails
  2019-06-28  9:50 [PATCH] mesh: Clear nodes queue on get_managed_objects_cb() fails Jakub Witowski
@ 2019-07-01 16:07 ` Gix, Brian
  0 siblings, 0 replies; 2+ messages in thread
From: Gix, Brian @ 2019-07-01 16:07 UTC (permalink / raw)
  To: jakub.witowski@silvair.com, linux-bluetooth@vger.kernel.org
  Cc: Stotland, Inga

Hi Jakub,

I am applying this, but please in the future subject tag your BlueZ mesh patches as [PATCH BlueZ <...>] so that
they are easier to spot.

On Fri, 2019-06-28 at 11:50 +0200, Jakub Witowski wrote:
> Currently when the get_managed_objects_cb() fails it frees
> the node resources but the node still remains on the "nodes" queue.
> 
> This implementation calls node_remove() instead of
> free_node_resources()."
> ---
>  mesh/node.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mesh/node.c b/mesh/node.c
> index 4e35bb3ff..2229aa711 100644
> --- a/mesh/node.c
> +++ b/mesh/node.c
> @@ -1601,7 +1601,7 @@ fail:
>  	} else {
>  		/* Handle failed Join and Create requests */
>  		if (node)
> -			free_node_resources(node);
> +			node_remove(node);
>  
>  		if (req->type == REQUEST_TYPE_JOIN) {
>  			node_join_ready_func_t cb = req->cb;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-01 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-28  9:50 [PATCH] mesh: Clear nodes queue on get_managed_objects_cb() fails Jakub Witowski
2019-07-01 16:07 ` Gix, Brian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).