Revision
16916
Author
rupa
Date
2010-03-05 10:56:28 -0600 (Fri, 05 Mar 2010)

Log Message

balance some mutex calls

Modified Paths

Diff

Modified: freeswitch/branches/rupa_limit/src/mod/applications/mod_hash/mod_hash.c (16915 => 16916)


--- freeswitch/branches/rupa_limit/src/mod/applications/mod_hash/mod_hash.c	2010-03-05 16:51:03 UTC (rev 16915)
+++ freeswitch/branches/rupa_limit/src/mod/applications/mod_hash/mod_hash.c	2010-03-05 16:56:28 UTC (rev 16916)
@@ -42,7 +42,6 @@
 /* CORE STUFF */
 static struct {
 	switch_memory_pool_t *pool;
-	switch_mutex_t *mutex;
 	switch_mutex_t *limit_hash_mutex;
 	switch_hash_t *limit_hash;
 	switch_mutex_t *db_hash_mutex;
@@ -410,7 +409,6 @@
 		return SWITCH_STATUS_FALSE;
 	}
 
-	switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
 	switch_mutex_init(&globals.limit_hash_mutex, SWITCH_MUTEX_NESTED, globals.pool);
 	switch_mutex_init(&globals.db_hash_mutex, SWITCH_MUTEX_NESTED, globals.pool);
 	switch_core_hash_init(&globals.limit_hash, pool);
@@ -437,10 +435,11 @@
 SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_hash_shutdown)
 {
 
-	switch_mutex_destroy(globals.mutex);
+	switch_mutex_destroy(globals.db_hash_mutex);
 	switch_mutex_destroy(globals.limit_hash_mutex);
 
 	switch_core_hash_destroy(&globals.limit_hash);
+	switch_core_hash_destroy(&globals.db_hash);
 
 	return SWITCH_STATUS_SUCCESS;
 }