Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] Help with a scoping problem

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

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Fri, 10 Sep 2004 07:48:50 +0200
Palmer Thomas J Civ HQ SSG/ENEP wrote:

Hi List,


I am trying to implement a pick list for the capture filter (capture_dlg.c) and I've run into a problem.

What is a pick list?

1) I have the following functions that exist in a new file within the gtk directory (both are linked into libui.lib):

extern void  cfilter_combo_remove_from_list(gchar *s);
extern gboolean cfilter_combo_add_recent(gchar *s);

2) I add the capture filter to a GList within capture_prep_ok_cb() by calling cfilter_combo_add_recent() 3) If the filter syntax is incorrect, which is determined within capture.c, I want to call cfilter_combo_remove_from_list(cfile.cfilter) to remove the incorrect entry from the list

4) When I call cfilter_combo_remove_from_list(cfile.cfilter) from capture.c, I get the following GTK assertions:

(ethereal-capture:772): GLib-GObject-CRITICAL **: file gobject.c: line 1642 (g_o
bject_get_data): assertion `G_IS_OBJECT (object)' failed

(ethereal-capture:772): GLib-GObject-CRITICAL **: file gobject.c: line 1642 (g_o
bject_get_data): assertion `G_IS_OBJECT (object)' failed

(ethereal-capture:772): GLib-GObject-CRITICAL **: file gobject.c: line 1655 (g_o
bject_set_data): assertion `G_IS_OBJECT (object)' failed

(ethereal-capture:772): GLib-GObject-CRITICAL **: file gobject.c: line 1642 (g_o
bject_get_data): assertion `G_IS_OBJECT (object)' failed

When calling cfilter_combo_remove_from_list(cfile.cfilter) from capture_dlg.c, which gets linked into libui.lib, it works fine.

The diff of the GTK directory and the new files are attached for reference. Any advice will be appreciated.

<<picklist.diff>> <<cfilter_combo_utils.c>> <<cfilter_combo_utils.h>>
                                                tjp

Sorry, no time right now and two patches and a bug still on the to do list...

Regards, ULFL