Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 zlib 1.1.4 dislikes Z_FLUSH at the end of infla...
details: https://anonhg.NetBSD.org/src/rev/261a4ab57859
branches: trunk
changeset: 523695:261a4ab57859
user: itojun <itojun%NetBSD.org@localhost>
date: Thu Mar 14 05:18:10 2002 +0000
description:
zlib 1.1.4 dislikes Z_FLUSH at the end of inflate().
diffstat:
sys/netinet6/ipcomp_core.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r 093b635cb3bc -r 261a4ab57859 sys/netinet6/ipcomp_core.c
--- a/sys/netinet6/ipcomp_core.c Thu Mar 14 04:51:20 2002 +0000
+++ b/sys/netinet6/ipcomp_core.c Thu Mar 14 05:18:10 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipcomp_core.c,v 1.18 2001/11/13 00:57:03 lukem Exp $ */
+/* $NetBSD: ipcomp_core.c,v 1.19 2002/03/14 05:18:10 itojun Exp $ */
/* $KAME: ipcomp_core.c,v 1.25 2001/07/26 06:53:17 jinmei Exp $ */
/*
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipcomp_core.c,v 1.18 2001/11/13 00:57:03 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipcomp_core.c,v 1.19 2002/03/14 05:18:10 itojun Exp $");
#include "opt_inet.h"
@@ -249,14 +249,17 @@
MOREBLOCK();
}
- zerror = mode ? inflate(&zs, Z_FINISH)
+ zerror = mode ? inflate(&zs, Z_SYNC_FLUSH)
: deflate(&zs, Z_FINISH);
if (zerror == Z_STREAM_END)
break;
- else if (zerror == Z_OK)
- ; /* once more. */
- else {
+ else if (zerror == Z_OK) {
+ if (mode && zs.avail_out != 0)
+ goto terminate;
+ else
+ ; /* once more. */
+ } else {
if (zs.msg) {
ipseclog((LOG_ERR, "ipcomp_%scompress: "
"%sflate(Z_FINISH): %s\n",
Home |
Main Index |
Thread Index |
Old Index