Ethereal-dev: Re: [ethereal-dev] Possible crash problem in file.c

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

From: Ben Fowler <wapdev@xxxxxxxxxxxx>
Date: Wed, 28 Jun 2000 19:00:07 +0100
At 08:16 AM 6/27/00, Guy Harris wrote:
On Sun, Jun 25, 2000 at 10:32:06PM +0100, Ben Fowler wrote:
> Unless there is an obvious way to get that routine to bail out, it
> might be a good idea to have file_quit_cmd_cb() stuff a suitable
> USER_CANCELLED_READ value in the capture_file structure,
> and have the read routine check this whenever it receives
> control back from the event loop.

I've done that (actually, there's now a state variable in there, which
is either:

        no capture file is open;

        the file is open and in the process of being read;

        the file is open, and in the process of being read, but the user
        asked that the read be terminated;

        the file is open and has been completely read).

Many thanks for your double plus good and speedy response.
This is exactly what is required. I have checked out a new
version of the sources and ethereal know works well for me.

Three virtual cheers for Guy, Gilbert and all the others!

The changes also allow Ethereal to, if you do File->Quit while a live
"update the screen as packets arrive" capture, kill off the child
process (which the code does with a "kill(<pid>, SIGTERM)" in UNIX; no
code is in there yet to do that on Win32) before exiting, so that it
doesn't leave the child process hanging around.

> Here is a patch which converts the global cf to cfile.

Checked in.


Ben.

--
Leedsnet - The information resource for Leeds and the West Riding
< URL:http://www.leedsnet.com/mobile/ >