linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ] mesh: Fix adding virtual subscription to a vendor model
@ 2020-04-29 18:05 Inga Stotland
  2020-04-30 17:59 ` Gix, Brian
  0 siblings, 1 reply; 2+ messages in thread
From: Inga Stotland @ 2020-04-29 18:05 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: brian.gix, Inga Stotland

This fixes a case when a configuration server receives a virtual
subscription add/overwrite command targeting a vendor model.
Correctly set "vendor" argument before trying to save the updated
subscrition to configuration file.
---
 mesh/cfgmod-server.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mesh/cfgmod-server.c b/mesh/cfgmod-server.c
index 856eb6b27..94825ed0e 100644
--- a/mesh/cfgmod-server.c
+++ b/mesh/cfgmod-server.c
@@ -358,6 +358,7 @@ static void config_sub_set(struct mesh_node *node, uint16_t net_idx,
 	case 22:
 		if (!virt)
 			return;
+		vendor = true;
 		mod_id = l_get_le16(pkt + 18) << 16;
 		mod_id |= l_get_le16(pkt + 20);
 		break;
-- 
2.21.1


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

* Re: [PATCH BlueZ] mesh: Fix adding virtual subscription to a vendor model
  2020-04-29 18:05 [PATCH BlueZ] mesh: Fix adding virtual subscription to a vendor model Inga Stotland
@ 2020-04-30 17:59 ` Gix, Brian
  0 siblings, 0 replies; 2+ messages in thread
From: Gix, Brian @ 2020-04-30 17:59 UTC (permalink / raw)
  To: linux-bluetooth, Stotland, Inga

Applied

On Wed, 2020-04-29 at 11:05 -0700, Inga Stotland wrote:
> This fixes a case when a configuration server receives a virtual
> subscription add/overwrite command targeting a vendor model.
> Correctly set "vendor" argument before trying to save the updated
> subscrition to configuration file.
> ---
>  mesh/cfgmod-server.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mesh/cfgmod-server.c b/mesh/cfgmod-server.c
> index 856eb6b27..94825ed0e 100644
> --- a/mesh/cfgmod-server.c
> +++ b/mesh/cfgmod-server.c
> @@ -358,6 +358,7 @@ static void config_sub_set(struct mesh_node *node, uint16_t net_idx,
>  	case 22:
>  		if (!virt)
>  			return;
> +		vendor = true;
>  		mod_id = l_get_le16(pkt + 18) << 16;
>  		mod_id |= l_get_le16(pkt + 20);
>  		break;

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

end of thread, other threads:[~2020-04-30 17:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 18:05 [PATCH BlueZ] mesh: Fix adding virtual subscription to a vendor model Inga Stotland
2020-04-30 17:59 ` 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).