@@ -2127,7 +2127,7 @@ SARA_R5_error_t SARA_R5::getOperator(String *oper)
2127
2127
searchPtr = strstr (response, " +COPS:" );
2128
2128
if (searchPtr != nullptr )
2129
2129
{
2130
- searchPtr += 6 ; // Move searchPtr to first char
2130
+ searchPtr += strlen ( " +COPS: " ) ; // Move searchPtr to first char
2131
2131
while (*searchPtr == ' ' ) searchPtr++; // skip spaces
2132
2132
mode = *searchPtr; // Read first char -- should be mode
2133
2133
if (mode == ' 2' ) // Check for de-register
@@ -2337,7 +2337,7 @@ SARA_R5_error_t SARA_R5::readSMSmessage(int location, String *unread, String *fr
2337
2337
searchPtr = strstr (searchPtr, " +CMGR:" );
2338
2338
if (searchPtr != nullptr )
2339
2339
{
2340
- searchPtr += 6 ; // Move searchPtr to first char
2340
+ searchPtr += strlen ( " +CMGR: " ) ; // Move searchPtr to first char
2341
2341
while (*searchPtr == ' ' ) searchPtr++; // skip spaces
2342
2342
int pointer = 0 ;
2343
2343
while ((*(++searchPtr) != ' \" ' ) && (*searchPtr != ' \0 ' ) && (pointer < 12 ))
@@ -6026,8 +6026,8 @@ SARA_R5_error_t SARA_R5::parseSocketCloseIndication(String *closeIndication)
6026
6026
int search;
6027
6027
int socket;
6028
6028
6029
- search = closeIndication->indexOf (" UUSOCL:" );
6030
- search += 7 ;
6029
+ search = closeIndication->indexOf (" + UUSOCL:" );
6030
+ search += strlen ( " +UUSOCL: " ) ;
6031
6031
while (closeIndication->charAt (search) == ' ' ) search ++; // skip spaces
6032
6032
6033
6033
// Socket will be first integer, should be single-digit number between 0-6:
0 commit comments