]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Null out the spawn reply after we're done with it to avoid seg
authorAndrew Thompson <andrew@hijacked.us>
Sun, 22 Aug 2010 20:50:40 +0000 (16:50 -0400)
committerAndrew Thompson <andrew@hijacked.us>
Mon, 23 Aug 2010 00:58:41 +0000 (20:58 -0400)
src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c

index 0e618c4a7028d79e672c4dc97637d85312bcde62..5f96cf8b5ce0b14f75b20c2307e86b6285bb7033 100644 (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);