diff options
author | kbyanc <kbyanc@FreeBSD.org> | 2002-11-05 18:52:25 +0000 |
---|---|---|
committer | kbyanc <kbyanc@FreeBSD.org> | 2002-11-05 18:52:25 +0000 |
commit | b7336fec7e7885791cc008dd34d1b26376753929 (patch) | |
tree | 9ca457f54034c7e7e830d10877ebb9e2f3a6e1dc /sys/kern/uipc_socket2.c | |
parent | 2107fab3005950f89f04a7fb51dfce999d098fed (diff) | |
download | FreeBSD-src-b7336fec7e7885791cc008dd34d1b26376753929.zip FreeBSD-src-b7336fec7e7885791cc008dd34d1b26376753929.tar.gz |
Spotted a couple of places where the socket buffer's counters were being
manipulated directly (rather than using sballoc()/sbfree()); update them
to tweak the new sb_ctl field too.
Sponsored by: NTT Multimedia Communications Labs
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r-- | sys/kern/uipc_socket2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 9872c22..f652b5a 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -705,6 +705,8 @@ sbcompress(sb, m, n) (unsigned)m->m_len); n->m_len += m->m_len; sb->sb_cc += m->m_len; + if (m->m_type != MT_DATA) /* XXX: Probably don't need.*/ + sb->sb_ctl += m->m_len; m = m_free(m); continue; } @@ -774,6 +776,8 @@ sbdrop(sb, len) m->m_len -= len; m->m_data += len; sb->sb_cc -= len; + if (m->m_type != MT_DATA) + sb->sb_ctl -= len; break; } len -= m->m_len; |