[commit] r10281 - freeswitch/trunk/src/mod/event_handlers/mod_erlang_event
Author: andrew Date: Thu Nov 6 22:21:19 2008 New Revision: 10281 Modified: freeswitch/trunk/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c Log: Don't create a new memory pool until it's clear we actually need it. Modified: freeswitch/trunk/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c ============================================================================== --- freeswitch/trunk/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c (original) +++ freeswitch/trunk/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c Thu Nov 6 22:21:19 2008 @@ -1191,11 +1191,6 @@ switch_log_bind_logger(socket_logger, SWITCH_LOG_DEBUG, SWITCH_FALSE); for (;;) { - if (switch_core_new_memory_pool(&listener_pool) != SWITCH_STATUS_SUCCESS) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "OH OH no pool\n"); - goto fail; - } - /* zero out errno because ei_accept doesn't differentiate between a * failed authentication or a socket failure, or a client version * mismatch or a godzilla attack */ @@ -1216,6 +1211,11 @@ break; } + if (switch_core_new_memory_pool(&listener_pool) != SWITCH_STATUS_SUCCESS) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "OH OH no pool\n"); + goto fail; + } + if (!(listener = switch_core_alloc(listener_pool, sizeof(*listener)))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error\n"); break;
participants (1)
-
Freeswitch SVN