diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-08 16:01:18 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-08 16:01:18 +0000 |
commit | 2239a0abb6976e310df0eb3307f089fdb23a3bbf (patch) | |
tree | 4de7080546c2d3472da727766e8d9d9a26db5f53 /nuttx/net/sendto.c | |
parent | 4bbf891c9446414a9a1641a70bc90d294115bd6f (diff) | |
download | px4-nuttx-2239a0abb6976e310df0eb3307f089fdb23a3bbf.tar.gz px4-nuttx-2239a0abb6976e310df0eb3307f089fdb23a3bbf.tar.bz2 px4-nuttx-2239a0abb6976e310df0eb3307f089fdb23a3bbf.zip |
Eliminate most uIP globals
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@378 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net/sendto.c')
-rw-r--r-- | nuttx/net/sendto.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/nuttx/net/sendto.c b/nuttx/net/sendto.c index 0d03252f5..d18ea8e3d 100644 --- a/nuttx/net/sendto.c +++ b/nuttx/net/sendto.c @@ -79,6 +79,7 @@ struct sendto_s * Parameters: * dev The sructure of the network driver that caused the interrupt * private An instance of struct sendto_s cast to void* + * flags Set of events describing why the callback was invoked * * Returned Value: * None @@ -89,14 +90,14 @@ struct sendto_s ****************************************************************************/ #ifdef CONFIG_NET_UDP -void sendto_interrupt(struct uip_driver_s *dev, void *private) +void sendto_interrupt(struct uip_driver_s *dev, struct uip_udp_conn *conn, uint8 flags) { - struct sendto_s *pstate = (struct sendto_s *)private; - if (private) + struct sendto_s *pstate = (struct sendto_s *)conn->private; + if (pstate) { /* Check if the connectin was rejected */ - if ((uip_flags & (UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT)) != 0) + if ((flags & (UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT)) != 0) { pstate->st_sndlen = -ENOTCONN; } @@ -111,8 +112,8 @@ void sendto_interrupt(struct uip_driver_s *dev, void *private) /* Don't allow any further call backs. */ - uip_udp_conn->private = NULL; - uip_udp_conn->event = NULL; + conn->private = NULL; + conn->event = NULL; /* Wake up the waiting thread */ |