Cellular: Handle AT response stop in case IP address is missing from CGPADDR response

pull/7740/head
Mirela Chirica 2018-08-09 11:41:19 +03:00
parent 273a052e89
commit c217a521f4
1 changed files with 1 additions and 0 deletions

View File

@ -61,6 +61,7 @@ const char *AT_CellularStack::get_ip_address()
int len = _at.read_string(_ip, NSAPI_IPv4_SIZE - 1);
if (len == -1) {
_ip[0] = '\0';
_at.resp_stop();
_at.unlock();
// no IPV4 address, return
return NULL;