Skip to content

Commit 50af2c3

Browse files
author
Cruz Monrreal
authored
Merge pull request #9752 from mirelachirica/add_comment_fix_warning
Add comment fix warning
2 parents 77591fb + c75e4a8 commit 50af2c3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

features/cellular/framework/AT/AT_CellularStack.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ class AT_CellularStack : public NetworkStack, public AT_CellularBase {
5252
*/
5353
virtual nsapi_error_t socket_stack_init();
5454

55+
/**
56+
* Note: Socket_open does not actually open socket on all drivers, but that's deferred until calling `sendto`.
57+
* The reason is that IP stack implementations are very much modem specific and it's quite common that when a
58+
* socket is created (via AT commands) it must also be given remote IP address, and that is usually known
59+
* only when calling `sendto`.
60+
*/
5561
virtual nsapi_error_t socket_open(nsapi_socket_t *handle, nsapi_protocol_t proto);
5662

5763
virtual nsapi_error_t socket_close(nsapi_socket_t handle);

features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ nsapi_size_or_error_t QUECTEL_BG96_CellularStack::socket_recvfrom_impl(CellularS
325325
port = _at.read_int();
326326
if (recv_len > 0) {
327327
// do not read more than buffer size
328-
recv_len = recv_len > size ? size : recv_len;
328+
recv_len = recv_len > (nsapi_size_or_error_t)size ? size : recv_len;
329329
_at.read_bytes((uint8_t *)buffer, recv_len);
330330
}
331331
_at.resp_stop();

0 commit comments

Comments
 (0)