Skip to content

Commit b8712b3

Browse files
Mirela ChiricaCruz Monrreal II
authored andcommitted
Cellular: Fix UDPSOCKET_SENDTO_INVALID test for BG96
1 parent 0ed5e80 commit b8712b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,11 @@ nsapi_size_or_error_t QUECTEL_BG96_CellularStack::socket_sendto_impl(CellularSoc
254254
if (size > BG96_MAX_SEND_SIZE) {
255255
return NSAPI_ERROR_PARAMETER;
256256
}
257+
258+
if (!size && socket->proto == NSAPI_UDP) {
259+
return NSAPI_ERROR_UNSUPPORTED;
260+
}
261+
257262
int sent_len = 0;
258263
int sent_len_before = 0;
259264
int sent_len_after = 0;

0 commit comments

Comments
 (0)