]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Use the core-provided memory pool instead of creating a new one
authorMathieu Rene <mrene@avgs.ca>
Mon, 23 Feb 2009 20:46:46 +0000 (20:46 +0000)
committerMathieu Rene <mrene@avgs.ca>
Mon, 23 Feb 2009 20:46:46 +0000 (20:46 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12256 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_lcr/mod_lcr.c

index 841b82b52cc423d58892078fa84e999552d59eef..510ffd9fffcbde97fea9241d0a8bc549aee4dcd0 100644 (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;
 }