Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Fix SMS Segment Ordering Issue in smsdb_put
Browse files Browse the repository at this point in the history
The condition check in the smsdb_put function now ensures all segments are received before processing. This fixes the issue where the segments were received out of order and the message was not being reassembled correctly.
  • Loading branch information
sparkcyf authored and RoEdAl committed Feb 5, 2024
1 parent 977d623 commit 9b9f5c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/smsdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ int smsdb_put(const char* id, const char* addr, int ref, int parts, int order, c
res = sqlite3_column_int(get_incomingmsg_cnt, 0);
}

if (res > 0 && order == parts) {
if (res == parts) {
{
SCOPED_STMT(get_incomingmsg);
if (bind_ast_str(get_incomingmsg, 1, fullkey) != SQLITE_OK) {
Expand Down

0 comments on commit 9b9f5c4

Please sign in to comment.