From b54c43801112711dcba341f3eb4701678a0e1916 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Thu, 9 Feb 2017 12:28:14 -0500 Subject: Convert conversation hash tables to use wmem. Simplifies cleanup because wmem can handle the memory cleanup. Change-Id: Idc6a9bfe5f23c83b59a5278a64b9fb706862342d Reviewed-on: https://code.wireshark.org/review/20042 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/conversation.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'epan/conversation.h') diff --git a/epan/conversation.h b/epan/conversation.h index 7b1c0a6b81..d31a210200 100644 --- a/epan/conversation.h +++ b/epan/conversation.h @@ -86,15 +86,14 @@ typedef struct conversation { } conversation_t; /** - * Destroy all existing conversations + * Create a new hash tables for conversations. */ -extern void conversation_cleanup(void); +extern void conversation_init(void); /** * Initialize some variables every time a file is loaded or re-loaded. - * Create a new hash table for the conversations in the new file. */ -extern void conversation_init(void); +extern void conversation_epan_reset(void); /* * Given two address/port pairs for a packet, create a new conversation @@ -189,16 +188,16 @@ extern void conversation_set_port2(conversation_t *conv, const guint32 port); extern void conversation_set_addr2(conversation_t *conv, const address *addr); WS_DLL_PUBLIC -GHashTable *get_conversation_hashtable_exact(void); +wmem_map_t *get_conversation_hashtable_exact(void); WS_DLL_PUBLIC -GHashTable *get_conversation_hashtable_no_addr2(void); +wmem_map_t *get_conversation_hashtable_no_addr2(void); WS_DLL_PUBLIC -GHashTable * get_conversation_hashtable_no_port2(void); +wmem_map_t * get_conversation_hashtable_no_port2(void); WS_DLL_PUBLIC -GHashTable *get_conversation_hashtable_no_addr2_or_port2(void); +wmem_map_t *get_conversation_hashtable_no_addr2_or_port2(void); #ifdef __cplusplus -- cgit v1.2.1