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 :)
pull/6087/head
Hasnain Virk 2017-12-14 15:20:27 +02:00 committed by Jimmy Brisson
parent 6281073d8b
commit e60227cf4d
4 changed files with 4 additions and 4 deletions

View File

@ -310,7 +310,7 @@ public:
*
* @return It could be one of these:
* i) 0 if there is nothing else to read.
* ii) Number of bytes still pending to read.
* ii) Number of bytes written to user buffer.
* iii) LORA_MAC_STATUS_WOULD_BLOCK if there is
* nothing available to read at the moment.
* iv) A negative error code on failure.

View File

@ -991,7 +991,7 @@ int16_t LoRaWANStack::handle_rx(const uint8_t port, uint8_t* data,
_rx_msg.receive_ready = false;
}
return _rx_msg.pending_size;
return base_size;
}
lora_mac_status_t LoRaWANStack::mlme_request_handler(lora_mac_mlme_req_t *mlme_request)

View File

@ -259,7 +259,7 @@ public:
*
* @return It could be one of these:
* i) 0 if there is nothing else to read.
* ii) Number of bytes still pending to read.
* ii) Number of bytes written to user buffer.
* iii) LORA_MAC_STATUS_WOULD_BLOCK if there is
* nothing available to read at the moment.
* iv) A negative error code on failure.

View File

@ -222,7 +222,7 @@ public:
*
* @return It could be one of these:
* i) 0 if there is nothing else to read.
* ii) Number of bytes still pending to read.
* ii) Number of bytes written to user buffer.
* iii) LORA_MAC_STATUS_WOULD_BLOCK if there is
* nothing available to read at the moment.
* iv) A negative error code on failure.