Use the core-provided memory pool instead of creating a new one

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12256 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Mathieu Rene 2009-02-23 20:46:46 +00:00
parent ea88aed04b
commit 0f966ded62
1 changed files with 2 additions and 5 deletions

View File

@ -1070,10 +1070,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_lcr_load)
return SWITCH_STATUS_FALSE;
#endif
if (switch_core_new_memory_pool(&globals.pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to create global memory pool\n");
return SWITCH_STATUS_FALSE;
}
globals.pool = pool;
if (lcr_load_config() != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to load lcr config file\n");
@ -1110,7 +1107,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_lcr_shutdown)
switch_odbc_handle_disconnect(globals.master_odbc);
switch_odbc_handle_destroy(&globals.master_odbc);
switch_core_hash_destroy(&globals.profile_hash);
switch_core_destroy_memory_pool(&globals.pool);
return SWITCH_STATUS_SUCCESS;
}