Ethereal-dev: Re: [Ethereal-dev] [Patch] - tethereal.c prevent SEGV after ringbuf switch file

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Thu, 10 Jun 2004 01:03:58 -0700
On Tue, Jun 08, 2004 at 11:23:31AM -0700, Brian Avery wrote:
> Simple patch.  The wtap_dumper in loop_data was being updated when ringbuf
> switched files but the dumper passed into write_packet was being used
> instead.

I checked in a change to move the ring-buffer tests to
"capture_pcap_cb()", so that the updated wtap_dumper gets passed to
"process_packet()".  That also arranges that the "wtap_dump_close()" on
a "wtap_dump()" error closes the new wtap_dumper.