diff mbox series

[BlueZ] mesh: Fix adding virtual subscription to a vendor model

Message ID 20200429180541.29791-1-inga.stotland@intel.com (mailing list archive)
State Accepted
Headers show
Series [BlueZ] mesh: Fix adding virtual subscription to a vendor model | expand

Commit Message

Stotland, Inga April 29, 2020, 6:05 p.m. UTC
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(+)

Comments

Brian Gix April 30, 2020, 5:59 p.m. UTC | #1
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;
diff mbox series

Patch

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;