diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-09-06 10:19:07 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-09-06 10:19:07 -0600 |
commit | 330ace7bd850c26b1e1e27b82c11f738321f5df9 (patch) | |
tree | 92a494e32eefd4ea3e9a6db0be769c1b29d6e853 /nuttx/net | |
parent | 1e205dcb3cffced05d77eeec92e48deaffb478c7 (diff) | |
download | px4-nuttx-330ace7bd850c26b1e1e27b82c11f738321f5df9.tar.gz px4-nuttx-330ace7bd850c26b1e1e27b82c11f738321f5df9.tar.bz2 px4-nuttx-330ace7bd850c26b1e1e27b82c11f738321f5df9.zip |
Missing file change for previous driver-based UDP backlog from Max Holtzberg
Diffstat (limited to 'nuttx/net')
-rw-r--r-- | nuttx/net/recvfrom.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c index 6864dace3..22b43a196 100644 --- a/nuttx/net/recvfrom.c +++ b/nuttx/net/recvfrom.c @@ -185,7 +185,7 @@ static inline void recvfrom_newtcpdata(FAR struct uip_driver_s *dev, * here. For example, what if up_datahandler() cannot buffer the * remainder of the packet? In that case, the data will be dropped but * still ACKed. Therefore it would not be resent. - * + * * This is probably not an issue here because we only get here if the * read-ahead buffers are empty and there would have to be something * serioulsy wrong with the configuration not to be able to buffer a @@ -410,7 +410,7 @@ static int recvfrom_timeout(struct recvfrom_s *pstate) * * Parameters: * dev - The device driver data structure - * pstate - the recvfrom state structure + * pstate - the recvfrom state structure * * Returned Value: * None @@ -509,7 +509,7 @@ static uint16_t recvfrom_tcpinterrupt(FAR struct uip_driver_s *dev, * bit to determine if more data will be received. You might * do this if read-ahead buffereing is disabled and we want to * minimize the loss of back-to-back packets. In this case, - * the transfer is complete when either a) the entire user buffer + * the transfer is complete when either a) the entire user buffer * is full or 2) when the receive timeout occurs (below). */ @@ -620,7 +620,7 @@ static uint16_t recvfrom_tcpinterrupt(FAR struct uip_driver_s *dev, pstate->rf_cb->priv = NULL; pstate->rf_cb->event = NULL; - /* Report an error only if no data has been received. (If + /* Report an error only if no data has been received. (If * CONFIG_NET_TCP_RECVDELAY then rf_recvlen should always be * zero). */ @@ -655,7 +655,7 @@ static uint16_t recvfrom_tcpinterrupt(FAR struct uip_driver_s *dev, * * Parameters: * dev - The device driver data structure - * pstate - the recvfrom state structure + * pstate - the recvfrom state structure * * Returned Value: * None @@ -953,6 +953,10 @@ static ssize_t udp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, uip_udpenable(conn); + /* Notify the device driver of the receive call */ + + netdev_rxnotify(&conn->ripaddr); + /* Wait for either the receive to complete or for an error/timeout to occur. * NOTES: (1) uip_lockedwait will also terminate if a signal is received, (2) * interrupts are disabled! They will be re-enabled while the task sleeps @@ -1033,7 +1037,7 @@ static ssize_t tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, * or if the user request was completely satisfied with data from the readahead * buffers. */ - + ret = state.rf_recvlen; #else |