mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-13 21:17:06 +00:00
fix startup race
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5502 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
fc1cd4e38b
commit
d04d8ffea1
2 files changed
+9
-6
No files matched your search
@@ -767,7 +767,10 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch
|
||||
switch_uuid_t uuid;
|
||||
uint32_t count = 0;
|
||||
|
||||
assert(endpoint_interface != NULL);
|
||||
if (!switch_core_ready() || endpoint_interface == NULL) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "The system cannot create any sessions at this time.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch_mutex_lock(session_manager.session_table_mutex);
|
||||
count = session_manager.session_count;
|
||||
@@ -778,11 +781,6 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!switch_core_ready()) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Read my lips: no new sessions!\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (pool && *pool) {
|
||||
usepool = *pool;
|
||||
*pool = NULL;
|
||||
|
||||
Reference in new issue
Block a user