Skip to content

Commit 995c96c

Browse files
trantanenjukkar
authored andcommitted
application: serial_lte_modem: sms: Fix receiving concatenated SMS
Collected rsp_buf for received concatenated SMS was from the stack. When 2nd and following parts were received, the first part was lost. So we always sent everything except the first part and not the #XSMS notification name and parameters other than the data. Moved rsp_buf to static RAM so it's preserved over multiple SMS parts. Jira: LRCS-169 Signed-off-by: Tommi Rantanen <[email protected]>
1 parent f1838f8 commit 995c96c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

applications/serial_lte_modem/src/slm_at_sms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static void sms_callback(struct sms_data *const data, void *context)
3030
static uint8_t total_msgs;
3131
static uint8_t count;
3232
static char messages[MAX_CONCATENATED_MESSAGE - 1][SMS_MAX_PAYLOAD_LEN_CHARS + 1];
33-
char rsp_buf[MAX_CONCATENATED_MESSAGE * SMS_MAX_PAYLOAD_LEN_CHARS + 64] = {0};
33+
static char rsp_buf[MAX_CONCATENATED_MESSAGE * SMS_MAX_PAYLOAD_LEN_CHARS + 64] = {0};
3434

3535
ARG_UNUSED(context);
3636

0 commit comments

Comments
 (0)