Skip to content

Add comment fix warning #9752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions features/cellular/framework/AT/AT_CellularStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ class AT_CellularStack : public NetworkStack, public AT_CellularBase {
*/
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,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();
Expand Down