Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/wireshark/files: wireshark-1.2.8-zlib-1.2.5-capture.patch
Date: Sat, 08 May 2010 07:24:24
Message-Id: 20100508072422.6480629678@corvid.gentoo.org
1 pva 10/05/08 07:24:22
2
3 Added: wireshark-1.2.8-zlib-1.2.5-capture.patch
4 Log:
5 Fix failure to capture packets with newer zlib, bug #316835, thank Richard for report.
6 (Portage version: 2.1.8.3/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 net-analyzer/wireshark/files/wireshark-1.2.8-zlib-1.2.5-capture.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/wireshark/files/wireshark-1.2.8-zlib-1.2.5-capture.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/wireshark/files/wireshark-1.2.8-zlib-1.2.5-capture.patch?rev=1.1&content-type=text/plain
13
14 Index: wireshark-1.2.8-zlib-1.2.5-capture.patch
15 ===================================================================
16 http://anonsvn.wireshark.org/viewvc?view=rev&revision=32715
17
18 --- trunk/wiretap/wtap.c 2010/05/07 19:24:32 32714
19 +++ trunk/wiretap/wtap.c 2010/05/07 19:45:47 32715
20 @@ -35,6 +35,10 @@
21 #include <unistd.h>
22 #endif
23
24 +#ifdef HAVE_LIBZ
25 +#include <zlib.h>
26 +#endif
27 +
28 #include "wtap-int.h"
29 #include "wtap.h"
30
31 @@ -646,6 +650,14 @@
32 */
33 wth->phdr.pkt_encap = wth->file_encap;
34
35 +#if defined(ZLIB_VERNUM) && ZLIB_VERNUM == 0x1250
36 + /* Reset EOF */
37 + /* g_log(NULL, G_LOG_LEVEL_DEBUG, "wtap_read: eof before seek: %d", gzeof(wth->fh)); */
38 + if (gzeof(wth->fh))
39 + gzseek(wth->fh, 0, SEEK_CUR);
40 + /* g_log(NULL, G_LOG_LEVEL_DEBUG, "wtap_read: eof after seek: %d", gzeof(wth->fh)); */
41 +#endif
42 +
43 if (!wth->subtype_read(wth, err, err_info, data_offset))
44 return FALSE; /* failure */