Skip to content

Commit 7059221

Browse files
authored
Merge pull request #10925 from AnttiKauppila/buff_size_fix
Doubled ATHandler's BUFF_SIZE
2 parents 0e3a963 + 369e2d5 commit 7059221

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

UNITTESTS/features/cellular/framework/AT/athandler/athandlertest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,15 +570,15 @@ TEST_F(TestATHandler, test_ATHandler_read_bytes)
570570
mbed_poll_stub::int_value = 1;;
571571

572572
// Read 5 bytes
573-
EXPECT_TRUE(5 == at.read_bytes(buf, 5));
573+
EXPECT_EQ(5, at.read_bytes(buf, 5));
574574
EXPECT_TRUE(!memcmp(buf, table1, 5));
575575
// get_char triggered above should have filled in the whole reading buffer(fill_buffer())
576-
EXPECT_TRUE(filehandle_stub_table_pos == (strlen(table1) - 1));
576+
EXPECT_EQ(filehandle_stub_table_pos, (strlen(table1)));
577577
// Read another 8 bytes
578578
EXPECT_TRUE(8 == at.read_bytes(buf, 8) && !memcmp(buf, table1 + 5, 8));
579579
// Reading more than the 4 bytes left -> ERROR
580-
EXPECT_TRUE(-1 == at.read_bytes(buf, 5));
581-
EXPECT_TRUE(NSAPI_ERROR_DEVICE_ERROR == at.get_last_error());
580+
EXPECT_EQ(-1, at.read_bytes(buf, 5));
581+
EXPECT_EQ(NSAPI_ERROR_DEVICE_ERROR, at.get_last_error());
582582
}
583583

584584
TEST_F(TestATHandler, test_ATHandler_read_string)

features/cellular/framework/AT/ATHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class FileHandle;
4343
extern const char *OK;
4444
extern const char *CRLF;
4545

46-
#define BUFF_SIZE 16
46+
#define BUFF_SIZE 32
4747

4848
/* AT Error types enumeration */
4949
enum DeviceErrorType {

0 commit comments

Comments
 (0)