aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-05-12 16:00:36 -0700
committerGuy Harris <guy@alum.mit.edu>2018-05-12 23:01:14 +0000
commitfb877ef5dac9ad3116021eaa2605ef29ba2d1a7c (patch)
tree3e4fdf47b403719907d89e1557c217e072692b1d
parent4e0de38081fdf8cad84b90eaa842a08c2ddbdb87 (diff)
Get rid of some GTK+-only stuff.
Change-Id: I6c14429d4d473464ad7bea18dee07c3adf34664d Reviewed-on: https://code.wireshark.org/review/27479 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/rtd_table.c13
-rw-r--r--epan/rtd_table.h11
-rw-r--r--sharkd_session.c2
-rw-r--r--ui/cli/tap-rtd.c2
-rw-r--r--ui/cli/tap-simple_stattable.c2
-rw-r--r--ui/qt/response_time_delay_dialog.cpp6
6 files changed, 10 insertions, 26 deletions
diff --git a/epan/rtd_table.c b/epan/rtd_table.c
index f5e4aaedb0..738e66ed40 100644
--- a/epan/rtd_table.c
+++ b/epan/rtd_table.c
@@ -82,7 +82,7 @@ register_rtd_table(const int proto_id, const char* tap_listener, guint num_table
wmem_tree_insert_string(registered_rtd_tables, proto_get_protocol_filter_name(proto_id), table, 0);
}
-void free_rtd_table(rtd_stat_table* table, rtd_gui_free_cb gui_callback, void *callback_data)
+void free_rtd_table(rtd_stat_table* table)
{
guint i;
@@ -93,23 +93,14 @@ void free_rtd_table(rtd_stat_table* table, rtd_gui_free_cb gui_callback, void *c
g_free(table->time_stats);
table->time_stats = NULL;
table->num_rtds = 0;
-
- /* Give GUI the first crack at it before we clean up */
- if (gui_callback)
- gui_callback(table, callback_data);
}
-void reset_rtd_table(rtd_stat_table* table, rtd_gui_reset_cb gui_callback, void *callback_data)
+void reset_rtd_table(rtd_stat_table* table)
{
guint i = 0;
for (i = 0; i < table->num_rtds; i++)
memset(table->time_stats[i].rtd, 0, sizeof(timestat_t)*table->time_stats[i].num_timestat);
-
- /* Give GUI the first crack at it before we clean up */
- if (gui_callback)
- gui_callback(table, callback_data);
-
}
register_rtd_t* get_rtd_table_by_name(const char* name)
diff --git a/epan/rtd_table.h b/epan/rtd_table.h
index 94ab9111d5..fcd308705d 100644
--- a/epan/rtd_table.h
+++ b/epan/rtd_table.h
@@ -49,9 +49,6 @@ struct register_rtd;
typedef struct register_rtd register_rtd_t;
typedef void (*rtd_gui_init_cb)(rtd_stat_table* rtd, void* gui_data);
-typedef void (*rtd_gui_reset_cb)(rtd_stat_table* rtd, void* gui_data); /* GTK+ only. */
-typedef void (*rtd_gui_free_cb)(rtd_stat_table* rtd, void* gui_data); /* GTK+ only. */
-typedef void (*rtd_init_cb)(struct register_rtd* rtd, rtd_gui_init_cb gui_callback, void* gui_data); /* GTK+ only. */
typedef void (*rtd_filter_check_cb)(const char *opt_arg, const char **filter, char** err);
/** Register the response time delay table.
@@ -112,18 +109,14 @@ WS_DLL_PUBLIC register_rtd_t* get_rtd_table_by_name(const char* name);
/** Free the RTD table data.
*
* @param table RTD stat table array
- * @param gui_callback optional callback from GUI
- * @param callback_data callback data needed for GUI
*/
-WS_DLL_PUBLIC void free_rtd_table(rtd_stat_table* table, rtd_gui_free_cb gui_callback, void *callback_data);
+WS_DLL_PUBLIC void free_rtd_table(rtd_stat_table* table);
/** Reset table data in the RTD.
*
* @param table RTD table
- * @param gui_callback optional callback from GUI
- * @param callback_data callback data needed for GUI
*/
-WS_DLL_PUBLIC void reset_rtd_table(rtd_stat_table* table, rtd_gui_reset_cb gui_callback, void *callback_data);
+WS_DLL_PUBLIC void reset_rtd_table(rtd_stat_table* table);
/** Interator to walk RTD tables and execute func
* Used for initialization
diff --git a/sharkd_session.c b/sharkd_session.c
index c278295f4f..a9545790cb 100644
--- a/sharkd_session.c
+++ b/sharkd_session.c
@@ -1857,7 +1857,7 @@ sharkd_session_free_tap_rtd_cb(void *arg)
{
rtd_data_t *rtd_data = (rtd_data_t *) arg;
- free_rtd_table(&rtd_data->stat_table, NULL, NULL);
+ free_rtd_table(&rtd_data->stat_table);
g_free(rtd_data);
}
diff --git a/ui/cli/tap-rtd.c b/ui/cli/tap-rtd.c
index b38a3627c3..0ec1ac2e03 100644
--- a/ui/cli/tap-rtd.c
+++ b/ui/cli/tap-rtd.c
@@ -103,7 +103,7 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter)
error_string = register_tap_listener(get_rtd_tap_listener_name(rtd), &ui->rtd, filter, 0, NULL, get_rtd_packet_func(rtd), rtd_draw);
if (error_string) {
- free_rtd_table(&ui->rtd.stat_table, NULL, NULL);
+ free_rtd_table(&ui->rtd.stat_table);
fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string->str);
g_string_free(error_string, TRUE);
exit(1);
diff --git a/ui/cli/tap-simple_stattable.c b/ui/cli/tap-simple_stattable.c
index d5e2c5d34c..2e9015a164 100644
--- a/ui/cli/tap-simple_stattable.c
+++ b/ui/cli/tap-simple_stattable.c
@@ -103,7 +103,7 @@ init_stat_table(stat_tap_table_ui *stat_tap, const char *filter)
error_string = register_tap_listener(stat_tap->tap_name, &ui->stats, filter, 0, NULL, stat_tap->packet_func, simple_draw);
if (error_string) {
-/* free_rtd_table(&ui->rtd.stat_table, NULL, NULL); */
+/* free_rtd_table(&ui->rtd.stat_table); */
fprintf(stderr, "tshark: Couldn't register tap: %s\n", error_string->str);
g_string_free(error_string, TRUE);
exit(1);
diff --git a/ui/qt/response_time_delay_dialog.cpp b/ui/qt/response_time_delay_dialog.cpp
index 8c62f9e337..e5e548900a 100644
--- a/ui/qt/response_time_delay_dialog.cpp
+++ b/ui/qt/response_time_delay_dialog.cpp
@@ -201,7 +201,7 @@ void ResponseTimeDelayDialog::tapReset(void *rtdd_ptr)
ResponseTimeDelayDialog *rtd_dlg = static_cast<ResponseTimeDelayDialog *>(rtdd->user_data);
if (!rtd_dlg) return;
- reset_rtd_table(&rtdd->stat_table, NULL, NULL);
+ reset_rtd_table(&rtdd->stat_table);
rtd_dlg->statsTreeWidget()->clear();
rtd_dlg->addRtdTable(&rtdd->stat_table);
}
@@ -241,7 +241,7 @@ void ResponseTimeDelayDialog::fillTree()
tapReset,
get_rtd_packet_func(rtd_),
tapDraw)) {
- free_rtd_table(&rtd_data.stat_table, NULL, NULL);
+ free_rtd_table(&rtd_data.stat_table);
reject(); // XXX Stay open instead?
return;
}
@@ -256,7 +256,7 @@ void ResponseTimeDelayDialog::fillTree()
statsTreeWidget()->setSortingEnabled(true);
removeTapListeners();
- free_rtd_table(&rtd_data.stat_table, NULL, NULL);
+ free_rtd_table(&rtd_data.stat_table);
}
QList<QVariant> ResponseTimeDelayDialog::treeItemData(QTreeWidgetItem *ti) const