diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-08-15 22:16:59 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-08-15 22:16:59 +0000 |
commit | 4df5d62d6e552c3b2ad20c47b012d1dcbd1c7c13 (patch) | |
tree | 797f20c293d4d01f19baf1da7eb80cd18765d76a /capture.c | |
parent | 01715081139692bafe9de45dc2b44f3e7cab380c (diff) | |
download | wireshark-4df5d62d6e552c3b2ad20c47b012d1dcbd1c7c13.tar.gz wireshark-4df5d62d6e552c3b2ad20c47b012d1dcbd1c7c13.tar.bz2 wireshark-4df5d62d6e552c3b2ad20c47b012d1dcbd1c7c13.zip |
"open_cap_file()", if it succeeds, closes any capture file we had open;
that means it destroys any read filter we had, so we don't need to
destroy it in "capture()" after "open_cap_file()" succeeds.
svn path=/trunk/; revision=498
Diffstat (limited to 'capture.c')
-rw-r--r-- | capture.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,7 +1,7 @@ /* capture.c * Routines for packet capture windows * - * $Id: capture.c,v 1.50 1999/08/15 19:18:46 guy Exp $ + * $Id: capture.c,v 1.51 1999/08/15 22:16:59 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -425,7 +425,7 @@ capture(void) { bpf_u_int32 netnum, netmask; time_t upd_time, cur_time; int err, inpkts; - + ld.go = TRUE; ld.counts.total = 0; ld.max = cf.count; @@ -626,9 +626,7 @@ capture(void) { /* "pch" is non-NULL only if we successfully started a capture. If we haven't, there's no capture file to load. */ if ((err = open_cap_file(cf.save_file, &cf)) == 0) { - /* Destroy any existing read filter, and set it to NULL. */ - if (cf.rfcode != NULL) - dfilter_destroy(cf.rfcode); + /* Set the read filter to NULL. */ cf.rfcode = NULL; if ((err = read_cap_file(&cf)) == 0) { set_menu_sensitivity("/File/Save", TRUE); |