wmc: increase estimate decapsulation buffer size
(dcbw) Some packets are much larger and require a lot more escaping than we thought so we need larger buffers here to be able to handle all packets. In this case, SMS receipt.
This commit is contained in:

committed by
Dan Williams

parent
c5a6e1fcab
commit
ac92ac7498
@@ -254,7 +254,7 @@ uml290_wmc_encapsulate (char *inbuf,
|
|||||||
|
|
||||||
estimated_out_len = cmd_len + strlen (AT_WMC_PREFIX);
|
estimated_out_len = cmd_len + strlen (AT_WMC_PREFIX);
|
||||||
estimated_out_len += 3; /* CRC + trailer */
|
estimated_out_len += 3; /* CRC + trailer */
|
||||||
estimated_out_len += cmd_len * 1.3; /* escaping */
|
estimated_out_len += cmd_len * 2; /* escaping */
|
||||||
wmc_return_val_if_fail (outbuf_len > estimated_out_len, 0);
|
wmc_return_val_if_fail (outbuf_len > estimated_out_len, 0);
|
||||||
|
|
||||||
memcpy (outbuf, AT_WMC_PREFIX, strlen (AT_WMC_PREFIX));
|
memcpy (outbuf, AT_WMC_PREFIX, strlen (AT_WMC_PREFIX));
|
||||||
|
Reference in New Issue
Block a user