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: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
This commit is contained in:
Karthikeyan Ramasubramanian 2014-07-11 11:08:01 -06:00
parent 82f65cf952
commit b3192d401f

View file

@ -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: