Re: [PATCH BlueZ] mesh: Fix encoding of Config Key Refresh Phase Status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Applied

On Tue, 2020-08-11 at 21:37 +0200, Michał Lowas-Rzechonek wrote:
> Config Key Refresh Phase Status is 4 octets long (see Mesh Profile
> v1.0.1, section 4.3.2.60): 1 octet for status, 2 octets for net key
> index, 1 octet for the phase.
> ---
>  mesh/cfgmod-server.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mesh/cfgmod-server.c b/mesh/cfgmod-server.c
> index 9da981700..90ebdf046 100644
> --- a/mesh/cfgmod-server.c
> +++ b/mesh/cfgmod-server.c
> @@ -447,11 +447,11 @@ static uint16_t cfg_key_refresh_phase(struct mesh_node *node,
>  
>  done:
>  	msg[n] = status;
> -	l_put_le16(idx, msg + n);
> -	msg[n + 2] = (status != MESH_STATUS_SUCCESS) ?
> +	l_put_le16(idx, &msg[n + 1]);
> +	msg[n + 3] = (status != MESH_STATUS_SUCCESS) ?
>  						KEY_REFRESH_PHASE_NONE : phase;
>  
> -	return n + 3;
> +	return n + 4;
>  }
>  
>  static uint8_t uint32_to_log(uint32_t value)




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux