Null out the spawn reply after we're done with it to avoid seg

This commit is contained in:
Andrew Thompson 2010-08-22 16:50:40 -04:00
parent c0d51b83f4
commit 5ef61c961f
1 changed files with 1 additions and 1 deletions

View File

@ -1323,7 +1323,6 @@ session_elem_t *attach_call_to_spawned_process(listener_t *listener, char *modul
switch_thread_cond_broadcast(p->ready_or_found);
switch_thread_cond_timedwait(p->ready_or_found,
p->mutex, 5000000);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "wtf\n");
if (!p->pid) {
p->state = reply_timeout;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Timed out when waiting for outbound pid %s %s\n", hash, session_element->uuid_str);
@ -1336,6 +1335,7 @@ session_elem_t *attach_call_to_spawned_process(listener_t *listener, char *modul
session_element->process.type = ERLANG_PID;
memcpy(&session_element->process.pid, p->pid, sizeof(erlang_pid));
session_element->spawn_reply = NULL;
switch_set_flag(session_element, LFLAG_SESSION_ALIVE);
switch_clear_flag(session_element, LFLAG_OUTBOUND_INIT);