From 9ba9cd83a4f72339b15aebbc1fbdde32f08ef3bc Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 9 Sep 2014 16:42:58 -0400 Subject: Qt: Add a CaptureFile class. Wrap the capture_file struct in a QObject which translates cf_cb_* and capture_cb_* events into signals. Move the global cfile to capture_file.cpp. Don't use a void pointer for the capture file struct. Change-Id: Ic5d5efb4bb1db64aa0247245890e5669b1da723a Reviewed-on: https://code.wireshark.org/review/5885 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs --- file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index 6657ca7401..acbe185795 100644 --- a/file.c +++ b/file.c @@ -195,14 +195,14 @@ cf_callback_add(cf_callback_t func, gpointer user_data) } void -cf_callback_remove(cf_callback_t func) +cf_callback_remove(cf_callback_t func, gpointer user_data) { cf_callback_data_t *cb; GList *cb_item = cf_callbacks; while (cb_item != NULL) { cb = (cf_callback_data_t *)cb_item->data; - if (cb->cb_fct == func) { + if (cb->cb_fct == func && cb->user_data == user_data) { cf_callbacks = g_list_remove(cf_callbacks, cb); g_free(cb); return; -- cgit v1.2.1