mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 11:53:01 +00:00
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:
parent
82f65cf952
commit
b3192d401f
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue