mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 16:58:35 +00:00
Merge pull request #477 in FS/freeswitch from ~TCSEKE/freeswitch:bugfix/FS-8147-mod_erlang_event_process_spawning_segfault to master
* commit '5ab4038f23a8ec968f1e89d033dcea22a968ccf5': Fix process spawing segfault
This commit is contained in:
commit
e0f57dcfba
@ -1224,7 +1224,7 @@ static switch_status_t handle_ref_tuple(listener_t *listener, erlang_msg * msg,
|
|||||||
for (iter = switch_core_hash_first(listener->sessions); iter; iter = switch_core_hash_next(&iter)) {
|
for (iter = switch_core_hash_first(listener->sessions); iter; iter = switch_core_hash_next(&iter)) {
|
||||||
switch_core_hash_this(iter, &key, NULL, &val);
|
switch_core_hash_this(iter, &key, NULL, &val);
|
||||||
se = (session_elem_t*)val;
|
se = (session_elem_t*)val;
|
||||||
if (se->spawn_reply && !strncmp(se->spawn_reply->hash, hash, 100)) {
|
if (switch_test_flag(se, LFLAG_WAITING_FOR_PID) && se->spawn_reply && !strncmp(se->spawn_reply->hash, hash, 100)) {
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "found matching session for %s : %s\n", hash, se->uuid_str);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "found matching session for %s : %s\n", hash, se->uuid_str);
|
||||||
|
|
||||||
|
@ -1582,7 +1582,6 @@ session_elem_t *attach_call_to_spawned_process(listener_t *listener, char *modul
|
|||||||
|
|
||||||
session_element->process.type = ERLANG_PID;
|
session_element->process.type = ERLANG_PID;
|
||||||
memcpy(&session_element->process.pid, p->pid, sizeof(erlang_pid));
|
memcpy(&session_element->process.pid, p->pid, sizeof(erlang_pid));
|
||||||
session_element->spawn_reply = NULL;
|
|
||||||
|
|
||||||
switch_clear_flag_locked(session_element, LFLAG_WAITING_FOR_PID);
|
switch_clear_flag_locked(session_element, LFLAG_WAITING_FOR_PID);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user