Skip to content

Commit e60227c

Browse files
Hasnain Virktheotherjimmy
authored andcommitted
Receive API typo fix
Receive API should return the length of data written to the user buffer as the Posix APIs suggest rather than sending the pending length of data back. That has actually been a typo mistake which actually wnt in even with doicumentation :)
1 parent 6281073 commit e60227c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

features/lorawan/LoRaWANInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ class LoRaWANInterface: public LoRaWANBase {
310310
*
311311
* @return It could be one of these:
312312
* i) 0 if there is nothing else to read.
313-
* ii) Number of bytes still pending to read.
313+
* ii) Number of bytes written to user buffer.
314314
* iii) LORA_MAC_STATUS_WOULD_BLOCK if there is
315315
* nothing available to read at the moment.
316316
* iv) A negative error code on failure.

features/lorawan/LoRaWANStack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ int16_t LoRaWANStack::handle_rx(const uint8_t port, uint8_t* data,
991991
_rx_msg.receive_ready = false;
992992
}
993993

994-
return _rx_msg.pending_size;
994+
return base_size;
995995
}
996996

997997
lora_mac_status_t LoRaWANStack::mlme_request_handler(lora_mac_mlme_req_t *mlme_request)

features/lorawan/LoRaWANStack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class LoRaWANStack: private mbed::NonCopyable<LoRaWANStack> {
259259
*
260260
* @return It could be one of these:
261261
* i) 0 if there is nothing else to read.
262-
* ii) Number of bytes still pending to read.
262+
* ii) Number of bytes written to user buffer.
263263
* iii) LORA_MAC_STATUS_WOULD_BLOCK if there is
264264
* nothing available to read at the moment.
265265
* iv) A negative error code on failure.

features/netsocket/LoRaWANBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ class LoRaWANBase {
222222
*
223223
* @return It could be one of these:
224224
* i) 0 if there is nothing else to read.
225-
* ii) Number of bytes still pending to read.
225+
* ii) Number of bytes written to user buffer.
226226
* iii) LORA_MAC_STATUS_WOULD_BLOCK if there is
227227
* nothing available to read at the moment.
228228
* iv) A negative error code on failure.

0 commit comments

Comments
 (0)