2019-08-05 07:57:05

by Michał Lowas-Rzechonek

[permalink] [raw]
Subject: [PATCH BlueZ] mesh: Fix storing network retransmission in config

---
mesh/mesh-config-json.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mesh/mesh-config-json.c b/mesh/mesh-config-json.c
index 177aaac7b..d49f5226a 100644
--- a/mesh/mesh-config-json.c
+++ b/mesh/mesh-config-json.c
@@ -1553,7 +1553,7 @@ bool mesh_config_write_net_transmit(struct mesh_config *cfg, uint8_t cnt,
jnode = cfg->jnode;

jretransmit = json_object_new_object();
- if (jretransmit)
+ if (!jretransmit)
return false;

if (!write_int(jretransmit, "count", cnt))
--
2.19.1


2019-08-06 16:57:50

by Gix, Brian

[permalink] [raw]
Subject: Re: [PATCH BlueZ] mesh: Fix storing network retransmission in config

Applied, Thanks

On Mon, 2019-08-05 at 09:54 +0200, Michał Lowas-Rzechonek wrote:
> ---
> mesh/mesh-config-json.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mesh/mesh-config-json.c b/mesh/mesh-config-json.c
> index 177aaac7b..d49f5226a 100644
> --- a/mesh/mesh-config-json.c
> +++ b/mesh/mesh-config-json.c
> @@ -1553,7 +1553,7 @@ bool mesh_config_write_net_transmit(struct mesh_config *cfg, uint8_t cnt,
> jnode = cfg->jnode;
>
> jretransmit = json_object_new_object();
> - if (jretransmit)
> + if (!jretransmit)
> return false;
>
> if (!write_int(jretransmit, "count", cnt))