Fix handling of callback result
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@379 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
69cbd66244
commit
a2affa9a9c
@ -63,7 +63,7 @@ CONFIG_DRAM_SIZE=0x01000000
|
||||
CONFIG_DRAM_START=0x01000000
|
||||
CONFIG_DRAM_VSTART=0x00000000
|
||||
CONFIG_DRAM_NUTTXENTRY=0x01008000
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_STACKDUMP=n
|
||||
|
||||
#
|
||||
# DM320 specific device driver settings
|
||||
@ -270,14 +270,14 @@ CONFIG_PREALLOC_TIMERS=8
|
||||
CONFIG_NET=y
|
||||
CONFIG_NET_IPv6=n
|
||||
CONFIG_NSOCKET_DESCRIPTORS=8
|
||||
CONFIG_NET_MAX_CONNECTIONS=40
|
||||
CONFIG_NET_MAX_LISTENPORTS=40
|
||||
CONFIG_NET_MAX_CONNECTIONS=8
|
||||
CONFIG_NET_MAX_LISTENPORTS=8
|
||||
CONFIG_NET_SOCKOPTS=y
|
||||
CONFIG_NET_BUFFER_SIZE=420
|
||||
CONFIG_NET_UDP=y
|
||||
CONFIG_NET_UDP_CHECKSUMS=y
|
||||
#CONFIG_NET_UDP_CONNS=10
|
||||
CONFIG_NET_STATISTICS=y
|
||||
CONFIG_NET_STATISTICS=n
|
||||
#CONFIG_NET_PINGADDRCONF=0
|
||||
#CONFIG_NET_RECEIVE_WINDOW=
|
||||
#CONFIG_NET_ARPTAB_SIZE=8
|
||||
|
@ -185,7 +185,10 @@ struct uip_conn
|
||||
/* Higher level logic can retain application specific information
|
||||
* in the following:
|
||||
*
|
||||
* data_event() is called on all events.
|
||||
* data_event() is called on all events. May return one of the following:
|
||||
* UIP_CLOSE - Gracefully close the current connection
|
||||
* UIP_ABORT - Abort (reset) the current connection on an error that
|
||||
* prevents UIP_CLOSE from working.
|
||||
* accept() is called when the TCP logic has created a connection
|
||||
* connection_event() is called on any of the subset of connection-related events
|
||||
*/
|
||||
|
@ -98,6 +98,8 @@ void uip_tcpappsend(struct uip_driver_s *dev, struct uip_conn *conn, uint8 resul
|
||||
{
|
||||
/* Handle the result based on the application response */
|
||||
|
||||
vdbg("result: %02x\n", result);
|
||||
|
||||
if (result & UIP_ABORT)
|
||||
{
|
||||
dev->d_sndlen = 0;
|
||||
@ -193,6 +195,8 @@ void uip_tcpappsend(struct uip_driver_s *dev, struct uip_conn *conn, uint8 resul
|
||||
|
||||
void uip_tcprexmit(struct uip_driver_s *dev, struct uip_conn *conn, uint8 result)
|
||||
{
|
||||
vdbg("result: %02x\n", result);
|
||||
|
||||
dev->d_appdata = dev->d_snddata;
|
||||
|
||||
/* If the application has data to be sent, or if the incoming packet had
|
||||
|
@ -75,7 +75,7 @@
|
||||
|
||||
uint8 uip_tcpcallback(struct uip_driver_s *dev, struct uip_conn *conn, uint8 flags)
|
||||
{
|
||||
uint8 ret = 0;
|
||||
uint8 ret = flags & (UIP_ACKDATA|UIP_NEWDATA);
|
||||
|
||||
vdbg("flags: %02x\n", flags);
|
||||
|
||||
@ -85,7 +85,7 @@ uint8 uip_tcpcallback(struct uip_driver_s *dev, struct uip_conn *conn, uint8 fla
|
||||
{
|
||||
/* Perform the callback */
|
||||
|
||||
ret = conn->data_event(dev, conn, flags);
|
||||
ret |= conn->data_event(dev, conn, flags);
|
||||
}
|
||||
|
||||
/* Check if there is a connection-related event and a connection
|
||||
|
Loading…
Reference in New Issue
Block a user