diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-06-22 15:27:01 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-06-22 15:27:01 -0600 |
commit | 811612f2294330eb76af73ab676c3a561a7b71c2 (patch) | |
tree | 63630c37ec72dde3499fd42603d89af873a70520 /nuttx/net/iob | |
parent | 1c8253772e4a162a3c5faa755745dc3b7fccf6db (diff) | |
download | px4-nuttx-811612f2294330eb76af73ab676c3a561a7b71c2.tar.gz px4-nuttx-811612f2294330eb76af73ab676c3a561a7b71c2.tar.bz2 px4-nuttx-811612f2294330eb76af73ab676c3a561a7b71c2.zip |
TCP write buffering: Correct handling of retry counter
Diffstat (limited to 'nuttx/net/iob')
-rw-r--r-- | nuttx/net/iob/iob_trimhead.c | 4 | ||||
-rw-r--r-- | nuttx/net/iob/iob_trimtail.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/nuttx/net/iob/iob_trimhead.c b/nuttx/net/iob/iob_trimhead.c index 0fe349023..23d8adf8a 100644 --- a/nuttx/net/iob/iob_trimhead.c +++ b/nuttx/net/iob/iob_trimhead.c @@ -40,6 +40,7 @@ #include <nuttx/config.h> #include <assert.h> +#include <debug.h> #include <nuttx/net/iob.h> @@ -83,6 +84,8 @@ FAR struct iob_s *iob_trimhead(FAR struct iob_s *iob, unsigned int trimlen) uint16_t pktlen; unsigned int len; + nllvdbg("iob=%p pktlen=%d trimlen=%d\n", iob, iob->io_pktlen, trimlen); + if (iob && trimlen > 0) { /* Trim from the head of the I/IO buffer chain */ @@ -94,6 +97,7 @@ FAR struct iob_s *iob_trimhead(FAR struct iob_s *iob, unsigned int trimlen) { /* Do we trim this entire I/O buffer away? */ + nllvdbg("iob=%p len=%d vs %d\n", iob, iob->io_len, len); if (iob->io_len <= len) { FAR struct iob_s *next; diff --git a/nuttx/net/iob/iob_trimtail.c b/nuttx/net/iob/iob_trimtail.c index 872560a49..61f536644 100644 --- a/nuttx/net/iob/iob_trimtail.c +++ b/nuttx/net/iob/iob_trimtail.c @@ -40,6 +40,7 @@ #include <nuttx/config.h> #include <string.h> +#include <debug.h> #include <nuttx/net/iob.h> @@ -81,6 +82,8 @@ FAR struct iob_s *iob_trimtail(FAR struct iob_s *iob, unsigned int trimlen) unsigned int iosize; int len; + nlldbg("iob=%p pktlen=%d trimlen=%d\n", iob, iob->io_pktlen, trimlen); + if (iob && trimlen > 0) { len = trimlen; @@ -113,6 +116,7 @@ FAR struct iob_s *iob_trimtail(FAR struct iob_s *iob, unsigned int trimlen) * I/O buffer away? */ + nllvdbg("iob=%p len=%d vs %d\n", last, last->io_len, len); if (last->io_len <= len) { /* Yes.. Consume the entire buffer */ |