Stopped the "TCP Follow" screen from producing an error when using

wiretap and gtk+-1.1.x. I also added an #include to util.c to keep
it from complaining about a lack of a definition of vsnprintf when
compiling with gtk+-1.1.x.

svn path=/trunk/; revision=136
This commit is contained in:
Gilbert Ramirez 1998-12-22 05:52:51 +00:00
parent 43558a7609
commit e37cbc4fc1
3 changed files with 12 additions and 7 deletions

View File

@ -1,7 +1,7 @@
/* capture.c
* Routines for packet capture windows
*
* $Id: capture.c,v 1.13 1998/12/17 05:42:19 gram Exp $
* $Id: capture.c,v 1.14 1998/12/22 05:52:48 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -293,7 +293,7 @@ capture_prep_cb(GtkWidget *w, gpointer d) {
gtk_box_pack_start (GTK_BOX (bbox), cancel_bt, TRUE, TRUE, 0);
gtk_widget_show(cancel_bt);
/* Attach pointers to needed widges to the capture prefs window/object */
/* Attach pointers to needed widgets to the capture prefs window/object */
gtk_object_set_data(GTK_OBJECT(cap_open_w), E_CAP_IFACE_KEY, if_cb);
gtk_object_set_data(GTK_OBJECT(cap_open_w), E_CAP_FILT_KEY, filter_te);
gtk_object_set_data(GTK_OBJECT(cap_open_w), E_CAP_FILE_KEY, file_te);

View File

@ -1,6 +1,6 @@
/* ethereal.c
*
* $Id: ethereal.c,v 1.16 1998/12/22 00:41:24 gram Exp $
* $Id: ethereal.c,v 1.17 1998/12/22 05:52:50 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -137,8 +137,11 @@ void
follow_stream_cb( GtkWidget *w, gpointer data ) {
char filename1[128];
GtkWidget *streamwindow, *box, *text, *vscrollbar, *table;
GtkWidget *filter_te = gtk_object_get_data(GTK_OBJECT(w),
E_DFILTER_TE_KEY);
GtkWidget *filter_te = NULL;
if (w)
filter_te = gtk_object_get_data(GTK_OBJECT(w), E_DFILTER_TE_KEY);
if( pi.ipproto == 6 ) {
/* we got tcp so we can follow */
/* check to see if we are using a filter */
@ -149,7 +152,8 @@ follow_stream_cb( GtkWidget *w, gpointer data ) {
}
/* create a new one and set the display filter entry accordingly */
cf.dfilter = build_follow_filter( &pi );
gtk_entry_set_text(GTK_ENTRY(filter_te), cf.dfilter);
if (filter_te)
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);

3
util.c
View File

@ -1,7 +1,7 @@
/* util.c
* Utility routines
*
* $Id: util.c,v 1.7 1998/10/28 21:22:33 gerald Exp $
* $Id: util.c,v 1.8 1998/12/22 05:52:51 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -33,6 +33,7 @@
#include <stdarg.h>
#include <strings.h>
#include <stdio.h>
#ifdef NEED_SNPRINTF_H
# ifdef HAVE_STDARG_H