diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-12-19 13:45:18 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-12-19 13:45:18 +0000 |
commit | 340b5f80b5eb6caf6c761b8687df2c2d670a65b8 (patch) | |
tree | 7aa9710e5ec881d163f6177a2313f921dfc93d27 /sys/net/ppp-deflate.c | |
parent | b71c763454b095579cac6de4a013f00b8ee8809e (diff) |
sync to 2.3b3
Diffstat (limited to 'sys/net/ppp-deflate.c')
-rw-r--r-- | sys/net/ppp-deflate.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/net/ppp-deflate.c b/sys/net/ppp-deflate.c index 008714330a0..25bc385e9eb 100644 --- a/sys/net/ppp-deflate.c +++ b/sys/net/ppp-deflate.c @@ -531,7 +531,9 @@ z_decompress(arg, mi, mop) for (;;) { r = inflate(&state->strm, flush); if (r != Z_OK) { +#ifndef DEFLATE_DEBUG if (state->debug) +#endif printf("z_decompress%d: inflate returned %d (%s)\n", state->unit, r, (state->strm.msg? state->strm.msg: "")); m_freem(mo_head); @@ -578,6 +580,11 @@ z_decompress(arg, mi, mop) return DECOMP_ERROR; } olen += (mo->m_len = ospace - state->strm.avail_out); +#ifdef DEFLATE_DEBUG + if (olen > state->mru + PPP_HDRLEN) + printf("ppp_deflate%d: exceeded mru (%d > %d)\n", + state->unit, olen, state->mru + PPP_HDRLEN); +#endif state->stats.unc_bytes += olen; state->stats.unc_packets++; @@ -627,10 +634,11 @@ z_incomp(arg, mi) r = inflateIncomp(&state->strm); if (r != Z_OK) { /* gak! */ - if (state->debug) { +#ifndef DEFLATE_DEBUG + if (state->debug) +#endif printf("z_incomp%d: inflateIncomp returned %d (%s)\n", state->unit, r, (state->strm.msg? state->strm.msg: "")); - } return; } mi = mi->m_next; |