diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-27 19:19:30 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-27 19:19:30 +0000 |
commit | 2a9b51de584c89c6a2dcb85cafb74424a47545cd (patch) | |
tree | 414e720883d4373d9a95fda398bdd4f799cc79b4 /nuttx/netutils/webclient/webclient.c | |
parent | 20c3067ff452e4e4604e11ec37479c50a4444de8 (diff) | |
download | px4-nuttx-2a9b51de584c89c6a2dcb85cafb74424a47545cd.tar.gz px4-nuttx-2a9b51de584c89c6a2dcb85cafb74424a47545cd.tar.bz2 px4-nuttx-2a9b51de584c89c6a2dcb85cafb74424a47545cd.zip |
Fixed missing logic in readahead buffer logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@409 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/netutils/webclient/webclient.c')
-rw-r--r-- | nuttx/netutils/webclient/webclient.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/nuttx/netutils/webclient/webclient.c b/nuttx/netutils/webclient/webclient.c index 8b5c66001..3521f6893 100644 --- a/nuttx/netutils/webclient/webclient.c +++ b/nuttx/netutils/webclient/webclient.c @@ -338,7 +338,7 @@ static void newdata(struct uip_driver_s *dev) { uint16 len; - len = uip_datalen(dev); + len = dev->d_len; if (s.state == WEBCLIENT_STATE_STATUSLINE) { len = parse_statusline(dev, len); @@ -363,7 +363,7 @@ uint8 uip_interrupt_event(struct uip_driver_s *dev, struct uip_conn *conn, uint8 #warning OBSOLETE -- needs to be redesigned g_return = flags; - if (uip_connected_event(flags)) + if ((flags & UIP_CONNECTED) != 0) { s.timer = 0; s.state = WEBCLIENT_STATE_STATUSLINE; @@ -378,33 +378,33 @@ uint8 uip_interrupt_event(struct uip_driver_s *dev, struct uip_conn *conn, uint8 return UIP_ABORT; } - if (uip_abort_event(flags)) + if ((flags & UIP_ABORT) != 0) { webclient_aborted(); } - if (uip_timeout_event(flags)) + if ((flags & UIP_TIMEDOUT) != 0) { webclient_timedout(); } - if (uip_ack_event(flags)) + if ((flags & UIP_ACKDATA) != 0) { s.timer = 0; acked(conn); } - if (uip_newdata_event(flags)) + if ((flags & UIP_NEWDATA) != 0) { s.timer = 0; newdata(dev); } - if (uip_rexmit_event(flags) || uip_newdata_event(flags) || uip_ack_event(flags)) + if ((flags & UIP_REXMIT) != 0 || (flags & UIP_NEWDATA) != 0 || (flags & UIP_ACKDATA) != 0) { senddata(dev, conn); } - else if (uip_poll_event(flags)) + else if ((flags & UIP_POLL) != 0) { ++s.timer; if (s.timer == WEBCLIENT_TIMEOUT) @@ -414,7 +414,7 @@ uint8 uip_interrupt_event(struct uip_driver_s *dev, struct uip_conn *conn, uint8 } } - if (uip_close_event(flags)) + if ((flags & UIP_CLOSE) != 0) { if (s.httpflag != HTTPFLAG_MOVED) { |