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
This commit is contained in:
Kelly Yancey 2002-11-05 18:52:25 +00:00
parent 247a32f22a
commit 04ac9b97b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106473
2 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -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;