summaryrefslogtreecommitdiff
path: root/nuttx/net/send.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-01 15:22:54 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-01 15:22:54 +0000
commitbe49f2a7430aa0dd9c0c09002af15bb2618cadb0 (patch)
treea4e4aa6be32a7606a0f2a3cfdc429f0543bbe8c2 /nuttx/net/send.c
parent17edc87d5eadbdcd81add3cd4ff8941fee253e14 (diff)
downloadpx4-nuttx-be49f2a7430aa0dd9c0c09002af15bb2618cadb0.tar.gz
px4-nuttx-be49f2a7430aa0dd9c0c09002af15bb2618cadb0.tar.bz2
px4-nuttx-be49f2a7430aa0dd9c0c09002af15bb2618cadb0.zip
Verify UDP support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@859 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net/send.c')
-rw-r--r--nuttx/net/send.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/nuttx/net/send.c b/nuttx/net/send.c
index 872adb391..14b9dc8cf 100644
--- a/nuttx/net/send.c
+++ b/nuttx/net/send.c
@@ -1,7 +1,7 @@
/****************************************************************************
* net/send.c
*
- * Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -256,9 +256,23 @@ static uint16 send_interrupt(struct uip_driver_s *dev, void *pvconn,
goto end_wait;
}
+ /* Check if the outgoing packet is available (it may have been claimed
+ * by a sendto interrupt serving a different thread.
+ */
+
+#if 0 /* We can't really support multiple senders on the same TCP socket */
+ else if (dev->d_sndlen > 0)
+ {
+ /* Another thread has beat us sending data, wait for the next poll */
+
+ return flags;
+ }
+#endif
+
/* We get here if (1) not all of the data has been ACKed, (2) we have been
- * asked to retransmit data, and (3) the connection is still healthy.
- * We are now free to send more data to receiver.
+ * asked to retransmit data, (3) the connection is still healthy, and (4)
+ * the outgoing packet is available for our use. In this case, we are
+ * now free to send more data to receiver.
*/
if (pstate->snd_sent < pstate->snd_buflen)