aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Deniel <laurent.deniel@free.fr>1999-07-31 13:10:18 +0000
committerLaurent Deniel <laurent.deniel@free.fr>1999-07-31 13:10:18 +0000
commit68e50f34862eca036a8c9069de891a89ddf1af8a (patch)
tree8516f929e573b4f0efc15625e4ac94f3ac14ab92
parent98ebf4ee0af188f97a8f1e612df8f0eac8e17b91 (diff)
downloadwireshark-68e50f34862eca036a8c9069de891a89ddf1af8a.tar.gz
wireshark-68e50f34862eca036a8c9069de891a89ddf1af8a.tar.bz2
wireshark-68e50f34862eca036a8c9069de891a89ddf1af8a.zip
- remove close_cap_file in follow_stream_cb since load_cap_file
implicitly calls it - compute the filter in follow_stream_cb since load_cap_file does not honor the display filter if the dfcode is non already set - Follow TCP stream is still buggy however (incorrect saved TCP data due to the fact that dissect_tcp is called even if the filter applies). svn path=/trunk/; revision=409
-rw-r--r--ethereal.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ethereal.c b/ethereal.c
index 04f09758ed..574e018351 100644
--- a/ethereal.c
+++ b/ethereal.c
@@ -1,6 +1,6 @@
/* ethereal.c
*
- * $Id: ethereal.c,v 1.68 1999/07/31 11:21:04 deniel Exp $
+ * $Id: ethereal.c,v 1.69 1999/07/31 13:10:18 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -229,13 +229,18 @@ follow_stream_cb( GtkWidget *w, gpointer data ) {
gtk_entry_set_text(GTK_ENTRY(filter_te), cf.dfilter);
/* reload so it goes in effect. Also we set data_out_file which
tells the tcp code to output the data */
- close_cap_file( &cf, info_bar, file_ctx);
strcpy( filename1, tmpnam(NULL) );
data_out_file = fopen( filename1, "a" );
if( data_out_file == NULL ) {
fprintf( stderr, "Could not open tmp file %s\n", filename1 );
}
reset_tcp_reassembly();
+ /* Compile the filter */
+ if (dfilter_compile(cf.dfilter, &cf.dfcode) != 0) {
+ simple_dialog(ESD_TYPE_WARN, NULL,
+ "Unable to parse filter string \"%s\".", cf.dfilter);
+ return;
+ }
err = load_cap_file( cf.filename, &cf );
if (err != 0) {
simple_dialog(ESD_TYPE_WARN, NULL, file_open_error_message(err, FALSE),