The condition check in the smsdb_put function now ensures all segments are received before processing. (when order == parts, (e.g. the quectel receive the msg parts in the order of 1, 3, 2, after received the third msg, the res > 0 && order == parts conditions will be satisfied, however part 2 of the msg still not received.
This commit may fixes the issue where the segments were received out of order and the message was not being reassembled correctly.
Related issue: https://github.com/RoEdAl/asterisk-chan-quectel/issues/11#issuecomment-1923205774
The condition check in the smsdb_put function now ensures all segments are received before processing. (when order == parts, (e.g. the quectel receive the msg parts in the order of 1, 3, 2, after received the third msg, the
res > 0 && order == parts
conditions will be satisfied, however part 2 of the msg still not received.This commit may fixes the issue where the segments were received out of order and the message was not being reassembled correctly.