mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #11249 from dextero/get-sms-zero
Make AT_CellularSMS::list_messages support index 0 in SMS inboxpull/11264/head
commit
0b49952b9e
|
|
@ -137,7 +137,7 @@ TEST_F(TestAT_CellularSMS, test_AT_CellularSMS_get_sms)
|
|||
EXPECT_TRUE(NSAPI_ERROR_PARAMETER == sms.get_sms(NULL, 16, phone, 21, stamp, 21, &size));
|
||||
|
||||
ATHandler_stub::resp_info_true_counter = 1;
|
||||
ATHandler_stub::int_value = 0;
|
||||
ATHandler_stub::int_value = -1;
|
||||
EXPECT_TRUE(-1 == sms.get_sms(buf, 16, phone, 21, stamp, 21, &size));
|
||||
|
||||
//In below we are expecting the stub ATHandler info_resp() to respond
|
||||
|
|
|
|||
|
|
@ -1044,7 +1044,7 @@ nsapi_error_t AT_CellularSMS::list_messages()
|
|||
(void)_at.consume_to_stop_tag(); // consume until <CR><LF>
|
||||
}
|
||||
|
||||
if (index > 0) {
|
||||
if (index >= 0) {
|
||||
add_info(info, index, part_number);
|
||||
} else {
|
||||
delete info;
|
||||
|
|
|
|||
Loading…
Reference in New Issue