Fix a rather nasty latency problem that occurs with single tcp sessions

thorough an MP setup with only a single link.
This commit is contained in:
Brian Somers 2000-07-12 15:08:03 +00:00
parent aa1d263e0c
commit cb8bd8dd72

View File

@ -442,26 +442,32 @@ mp_Assemble(struct mp *mp, struct mbuf *m, struct physical *p)
* the queue.
*/
if (!mp->inbufs) {
mp->inbufs = m;
m = NULL;
}
last = NULL;
seq = mp->seq.next_in;
q = mp->inbufs;
while (q) {
mp_ReadHeader(mp, q, &h);
if (m && isbefore(mp->local_is12bit, mh.seq, h.seq)) {
/* Our received fragment fits in before this one, so link it in */
while (q || m) {
if (!q) {
if (last)
last->m_nextpkt = m;
else
mp->inbufs = m;
m->m_nextpkt = q;
q = m;
h = mh;
m = NULL;
h = mh;
} else {
mp_ReadHeader(mp, q, &h);
if (m && isbefore(mp->local_is12bit, mh.seq, h.seq)) {
/* Our received fragment fits in before this one, so link it in */
if (last)
last->m_nextpkt = m;
else
mp->inbufs = m;
m->m_nextpkt = q;
q = m;
h = mh;
m = NULL;
}
}
if (h.seq != seq) {