From b7336fec7e7885791cc008dd34d1b26376753929 Mon Sep 17 00:00:00 2001 From: kbyanc Date: Tue, 5 Nov 2002 18:52:25 +0000 Subject: 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 --- sys/kern/uipc_sockbuf.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/kern/uipc_sockbuf.c') diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index 9872c22..f652b5a 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.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; -- cgit v1.1