Ethereal-dev: [ethereal-dev] Some more patches to ethereal
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Santeri Paavolainen <santtu@xxxxxx>
Date: Thu, 30 Sep 1999 13:07:55 +0300 (EET DST)
Here's a small patch which fixes a SEGV dumper, and makes the previous color to be the default for the color chooser. -- santtu@xxxxxx I have become death, destroyer of the worlds.
diff -rc ethereal-0.7.5-orig/colors.c ethereal-0.7.5/colors.c *** ethereal-0.7.5-orig/colors.c Mon Sep 13 17:51:21 1999 --- ethereal-0.7.5/colors.c Thu Sep 30 10:59:29 1999 *************** *** 515,522 **** gpointer user_data) { colfilter *filter; filter = (colfilter *)user_data; /* UNUSED */ ! create_color_sel_win(&cf); bg_set_flag = 0; } --- 515,525 ---- gpointer user_data) { colfilter *filter; + color_filter_t * cof; + filter = (colfilter *)user_data; /* UNUSED */ ! cof = color_filter(&cf, filter->row_selected); ! create_color_sel_win(&cf, &cof->fg_color); bg_set_flag = 0; } *************** *** 527,534 **** gpointer user_data) { colfilter *filter; filter = (colfilter *)user_data; /* UNUSED */ ! create_color_sel_win(&cf); bg_set_flag = 1; } --- 530,540 ---- gpointer user_data) { colfilter *filter; + color_filter_t * cof; + filter = (colfilter *)user_data; /* UNUSED */ ! cof = color_filter(&cf, filter->row_selected); ! create_color_sel_win(&cf, &cof->bg_color); bg_set_flag = 1; } *************** *** 1039,1045 **** } GtkWidget* ! create_color_sel_win (capture_file *cf) { GtkWidget *color_sel_win; GtkWidget *color_sel_ok; --- 1045,1051 ---- } GtkWidget* ! create_color_sel_win (capture_file *cf, GdkColor * color) { GtkWidget *color_sel_win; GtkWidget *color_sel_ok; *************** *** 1049,1054 **** --- 1055,1070 ---- color_sel_win = gtk_color_selection_dialog_new (("Choose color")); gtk_object_set_data (GTK_OBJECT (color_sel_win), "color_sel_win", color_sel_win); gtk_container_set_border_width (GTK_CONTAINER (color_sel_win), 10); + + if (color != NULL) { + gdouble cols[3]; + + cols[0] = (gdouble)color->red / 65536.0; + cols[1] = (gdouble)color->green / 65536.0; + cols[2] = (gdouble)color->blue / 65536.0; + + gtk_color_selection_set_color(((GtkColorSelectionDialog *) color_sel_win)->colorsel, cols); + } color_sel_ok = GTK_COLOR_SELECTION_DIALOG (color_sel_win)->ok_button; gtk_object_set_data (GTK_OBJECT (color_sel_win), "color_sel_ok", color_sel_ok); diff -rc ethereal-0.7.5-orig/colors.h ethereal-0.7.5/colors.h *** ethereal-0.7.5-orig/colors.h Sun Aug 29 01:09:50 1999 --- ethereal-0.7.5/colors.h Thu Sep 30 10:54:51 1999 *************** *** 153,159 **** GtkWidget* create_colorize_win (cap_file *cf, GtkWidget **colorize_filter_name, GtkWidget **colorize_filter_text); ! GtkWidget* create_color_sel_win (cap_file *cf); #endif --- 153,159 ---- GtkWidget* create_colorize_win (cap_file *cf, GtkWidget **colorize_filter_name, GtkWidget **colorize_filter_text); ! GtkWidget* create_color_sel_win (cap_file *cf, GdkColor *); #endif diff -rc ethereal-0.7.5-orig/dfilter.c ethereal-0.7.5/dfilter.c *** ethereal-0.7.5-orig/dfilter.c Mon Aug 30 19:01:42 1999 --- ethereal-0.7.5/dfilter.c Thu Sep 30 13:42:09 1999 *************** *** 329,334 **** --- 329,337 ---- dfilter_apply(dfilter *dfcode, proto_tree *ptree, const guint8* pd) { gboolean retval; + if (dfcode == NULL) + return FALSE; + retval = dfilter_apply_node(dfcode->dftree, ptree, pd); return retval; } Only in ethereal-0.7.5/doc: Makefile Only in ethereal-0.7.5/doc: dfilter2pod Only in ethereal-0.7.5/doc: ethereal.pod Only in ethereal-0.7.5: ethereal.1 diff -rc ethereal-0.7.5-orig/file.c ethereal-0.7.5/file.c *** ethereal-0.7.5-orig/file.c Fri Sep 24 17:50:47 1999 --- ethereal-0.7.5/file.c Thu Sep 30 10:13:35 1999 *************** *** 1007,1012 **** --- 1007,1016 ---- if (fd->row == row) break; } + + if (fd == NULL) + return; + cf->fd = fd; /* Remember the ordinal number of that frame. */ Only in ethereal-0.7.5-orig: ps.c
- References:
- Re: [ethereal-dev] Ethereal bug: Empty filter field causes SEGV
- From: Gilbert Ramirez
- Re: [ethereal-dev] Ethereal bug: Empty filter field causes SEGV
- Prev by Date: Re: [ethereal-dev] Problems / suggestions
- Next by Date: [ethereal-dev] Ethereal on SINIX machines
- Previous by thread: [ethereal-dev] dfilter_apply_node assfail glib-1.2.5 G_NODE_IS_ROOT
- Next by thread: [ethereal-dev] New parser implementation
- Index(es):