Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3192d40 authored by Karthikeyan Ramasubramanian's avatar Karthikeyan Ramasubramanian
Browse files

lib: qmi_encdec: Fix encoding a variable length element



If a variable length element has type associated with it and if the length
is specified as zero, encode the element's type and length information in
the QMI message.

Change-Id: Ic4dfe56d0199f5bd622fdd8e18e0d29169cd5bb0
Signed-off-by: default avatarKarthikeyan Ramasubramanian <kramasub@codeaurora.org>
parent 82f65cf9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -428,9 +428,10 @@ static int _qmi_kernel_encode(struct elem_info *ei_array,
						   1, data_len_sz);
			UPDATE_ENCODE_VARIABLES(temp_ei, buf_dst,
				encoded_bytes, tlv_len, encode_tlv, rc);
			encode_tlv = 0;
			if (!data_len_value)
				temp_ei = skip_to_next_elem(temp_ei, enc_level);
			else
				encode_tlv = 0;
			break;

		case QMI_UNSIGNED_1_BYTE: