Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern In sbcompress(), if we toss an empty mbuf, make sur...



details:   https://anonhg.NetBSD.org/src/rev/4e183d61c122
branches:  trunk
changeset: 535573:4e183d61c122
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Aug 22 20:56:48 2002 +0000

description:
In sbcompress(), if we toss an empty mbuf, make sure to update
sb_lastrecord if necessary.

>From Daniel Hartmeier <daniel%benzedrine.cx@localhost>.

diffstat:

 sys/kern/uipc_socket2.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 8948ce329868 -r 4e183d61c122 sys/kern/uipc_socket2.c
--- a/sys/kern/uipc_socket2.c   Thu Aug 22 20:42:22 2002 +0000
+++ b/sys/kern/uipc_socket2.c   Thu Aug 22 20:56:48 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket2.c,v 1.45 2002/07/03 21:39:41 thorpej Exp $        */
+/*     $NetBSD: uipc_socket2.c,v 1.46 2002/08/22 20:56:48 thorpej Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1990, 1993
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.45 2002/07/03 21:39:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.46 2002/08/22 20:56:48 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -757,6 +757,8 @@
                    (eor == 0 ||
                     (((o = m->m_next) || (o = n)) &&
                      o->m_type == m->m_type))) {
+                       if (sb->sb_lastrecord == m)
+                               sb->sb_lastrecord = m->m_next;
                        m = m_free(m);
                        continue;
                }



Home | Main Index | Thread Index | Old Index