diff options
author | Michael Mann <mmann78@netscape.net> | 2017-10-28 13:26:51 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-10-28 19:22:24 +0000 |
commit | 7dbc520d57b8567738a15f617a11d9b5b70f40a7 (patch) | |
tree | 4b39448bd5f2243275f1d0590e0e1f0b4a3469dc /ui | |
parent | db3be9f850446c1a1c4894f5d08d67a370abf94a (diff) |
Privatize the conversation_key structure
The intention is to make it more transparent when making a switch
to an "endpoint" over address/port combination.
Change-Id: Ic424c32095ecb103bcb4f7f4079c549de2c8d9c4
Reviewed-on: https://code.wireshark.org/review/24148
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/conversation_hastables_dlg.c | 4 | ||||
-rw-r--r-- | ui/qt/conversation_hash_tables_dialog.cpp | 10 |
2 files changed, 5 insertions, 9 deletions
diff --git a/ui/gtk/conversation_hastables_dlg.c b/ui/gtk/conversation_hastables_dlg.c index c7c6122173..be01abd2e5 100644 --- a/ui/gtk/conversation_hastables_dlg.c +++ b/ui/gtk/conversation_hastables_dlg.c @@ -45,10 +45,8 @@ conversation_hashtable_exact_to_texbuff(gpointer key, gpointer value _U_, gpoint { gchar string_buff[CONV_STR_BUF_MAX]; GtkTextBuffer *buffer = (GtkTextBuffer*)user_data; - /*conversation_t *conversation = (conversation_t *)value;*/ - conversation_key *conv_key = (conversation_key*)key; - g_snprintf(string_buff, CONV_STR_BUF_MAX, "Key:0x%x\n",conversation_hash_exact(conv_key)); + g_snprintf(string_buff, CONV_STR_BUF_MAX, "Key:0x%x\n",conversation_hash_exact(key)); gtk_text_buffer_insert_at_cursor (buffer, string_buff, -1); diff --git a/ui/qt/conversation_hash_tables_dialog.cpp b/ui/qt/conversation_hash_tables_dialog.cpp index 11b6cbbf0c..356b70ac71 100644 --- a/ui/qt/conversation_hash_tables_dialog.cpp +++ b/ui/qt/conversation_hash_tables_dialog.cpp @@ -61,15 +61,13 @@ ConversationHashTablesDialog::~ConversationHashTablesDialog() static void populate_html_table(gpointer data, gpointer user_data) { - const conversation_key *conv_key = (const conversation_key *)data; + const conversation_key_t conv_key = (const conversation_key_t)data; QString* html_table = (QString*)user_data; + gchar* tmp = conversation_get_html_hash(conv_key); // XXX Add a column for the hash value. - (*html_table) += QString("<tr><td>%1</td><td>%2</td><td>%3</td><td>%4</td></tr>\n") - .arg(address_to_qstring(&conv_key->addr1)) - .arg(conv_key->port1) - .arg(address_to_qstring(&conv_key->addr2)) - .arg(conv_key->port2); + (*html_table) += QString(tmp); + wmem_free(NULL, tmp); } const QString ConversationHashTablesDialog::hashTableToHtmlTable(const QString table_name, wmem_map_t *hash_table) |