提交 5e912b04 authored 作者: Sergey Safarov's avatar Sergey Safarov

FS-8999: Fixed broken Erlang outbound connection

上级 00a3fe4d
......@@ -1517,8 +1517,6 @@ session_elem_t *attach_call_to_spawned_process(listener_t *listener, char *modul
char hash[100];
spawn_reply_t *p;
erlang_ref ref;
switch_os_socket_t sockdes;
switch_os_sock_get(&sockdes, listen_list.sock);
ei_init_ref(listener->ec, &ref);
ei_hash_ref(&ref, hash);
......@@ -1554,7 +1552,7 @@ session_elem_t *attach_call_to_spawned_process(listener_t *listener, char *modul
ei_x_encode_ref(&rbuf, &ref);
ei_x_encode_pid(&rbuf, ei_self(listener->ec));
/* should lock with mutex? */
ei_reg_send(listener->ec, sockdes, module, rbuf.buff, rbuf.index);
ei_reg_send(listener->ec, listener->sockdes, module, rbuf.buff, rbuf.index);
#ifdef EI_DEBUG
ei_x_print_reg_msg(&rbuf, module, 1);
#endif
......@@ -1563,7 +1561,7 @@ session_elem_t *attach_call_to_spawned_process(listener_t *listener, char *modul
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "rpc call: %s:%s(Ref)\n", module, function);
/* should lock with mutex? */
switch_mutex_lock(listener->sock_mutex);
ei_pid_from_rpc(listener->ec, sockdes, &ref, module, function);
ei_pid_from_rpc(listener->ec, listener->sockdes, &ref, module, function);
switch_mutex_unlock(listener->sock_mutex);
/*
char *argv[1];
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论