Merge pull request #9752 from mirelachirica/add_comment_fix_warning

Add comment fix warning
pull/9666/head
Cruz Monrreal 2019-02-21 17:30:34 -06:00 committed by GitHub
commit 50af2c341c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -52,6 +52,12 @@ protected: // NetworkStack
*/
virtual nsapi_error_t socket_stack_init();
/**
* Note: Socket_open does not actually open socket on all drivers, but that's deferred until calling `sendto`.
* The reason is that IP stack implementations are very much modem specific and it's quite common that when a
* socket is created (via AT commands) it must also be given remote IP address, and that is usually known
* only when calling `sendto`.
*/
virtual nsapi_error_t socket_open(nsapi_socket_t *handle, nsapi_protocol_t proto);
virtual nsapi_error_t socket_close(nsapi_socket_t handle);

View File

@ -325,7 +325,7 @@ nsapi_size_or_error_t QUECTEL_BG96_CellularStack::socket_recvfrom_impl(CellularS
port = _at.read_int();
if (recv_len > 0) {
// do not read more than buffer size
recv_len = recv_len > size ? size : recv_len;
recv_len = recv_len > (nsapi_size_or_error_t)size ? size : recv_len;
_at.read_bytes((uint8_t *)buffer, recv_len);
}
_at.resp_stop();