mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-10 11:50:53 +00:00
cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4419 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
c612d4226b
commit
ed76b25241
5 files changed
+17
-25
No files matched your search
+6
-11
@@ -590,13 +590,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_sessio
|
||||
if (switch_test_flag(session, SSF_DESTROYED)) {
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
#ifdef SWITCH_DEBUG_RWLOCKS
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_DEBUG, "%s Read lock FAIL\n",
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Read lock FAIL\n",
|
||||
switch_channel_get_name(session->channel));
|
||||
#endif
|
||||
} else {
|
||||
status = (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock);
|
||||
#ifdef SWITCH_DEBUG_RWLOCKS
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_DEBUG, "%s Read lock AQUIRED\n",
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Read lock AQUIRED\n",
|
||||
switch_channel_get_name(session->channel));
|
||||
#endif
|
||||
}
|
||||
@@ -612,7 +612,7 @@ SWITCH_DECLARE(void) switch_core_session_perform_write_lock(switch_core_session_
|
||||
int line)
|
||||
{
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_DEBUG, "%s Write lock AQUIRED\n",
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Write lock AQUIRED\n",
|
||||
switch_channel_get_name(session->channel));
|
||||
#else
|
||||
SWITCH_DECLARE(void) switch_core_session_write_lock(switch_core_session_t *session)
|
||||
@@ -627,7 +627,7 @@ SWITCH_DECLARE(void) switch_core_session_perform_rwunlock(switch_core_session_t
|
||||
const char *func,
|
||||
int line)
|
||||
{
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_DEBUG, "%s Read/Write lock CLEARED\n",
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Read/Write lock CLEARED\n",
|
||||
switch_channel_get_name(session->channel));
|
||||
#else
|
||||
SWITCH_DECLARE(void) switch_core_session_rwunlock(switch_core_session_t *session)
|
||||
@@ -4563,7 +4563,7 @@ SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, uint32
|
||||
return 0;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_destroy(int vg)
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_destroy(void)
|
||||
{
|
||||
switch_event_t *event;
|
||||
if (switch_event_create(&event, SWITCH_EVENT_SHUTDOWN) == SWITCH_STATUS_SUCCESS) {
|
||||
@@ -4590,9 +4590,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(int vg)
|
||||
switch_core_db_close(runtime.db);
|
||||
switch_core_db_close(runtime.event_db);
|
||||
switch_xml_destroy();
|
||||
if (vg) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Full destruction of the core disabled for memory debugging purposes.\n");
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Finalizing Shutdown.\n");
|
||||
switch_log_shutdown();
|
||||
|
||||
@@ -4617,9 +4614,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(int vg)
|
||||
|
||||
if (runtime.memory_pool) {
|
||||
apr_pool_destroy(runtime.memory_pool);
|
||||
if (!vg) {
|
||||
apr_terminate();
|
||||
}
|
||||
//apr_terminate();
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
Reference in new issue
Block a user