mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 20:50:41 +00:00
Merge pull request #787 in FS/freeswitch from ~SAFAROV/freeswitch2:FS-8999 to master
* commit '5e912b04a6ab5a3e5643c27c68dc399821072cb1': FS-8999: Fixed broken Erlang outbound connection
This commit is contained in:
commit
9d67ce4c03
@ -1517,8 +1517,6 @@ session_elem_t *attach_call_to_spawned_process(listener_t *listener, char *modul
|
|||||||
char hash[100];
|
char hash[100];
|
||||||
spawn_reply_t *p;
|
spawn_reply_t *p;
|
||||||
erlang_ref ref;
|
erlang_ref ref;
|
||||||
switch_os_socket_t sockdes;
|
|
||||||
switch_os_sock_get(&sockdes, listen_list.sock);
|
|
||||||
|
|
||||||
ei_init_ref(listener->ec, &ref);
|
ei_init_ref(listener->ec, &ref);
|
||||||
ei_hash_ref(&ref, hash);
|
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_ref(&rbuf, &ref);
|
||||||
ei_x_encode_pid(&rbuf, ei_self(listener->ec));
|
ei_x_encode_pid(&rbuf, ei_self(listener->ec));
|
||||||
/* should lock with mutex? */
|
/* 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
|
#ifdef EI_DEBUG
|
||||||
ei_x_print_reg_msg(&rbuf, module, 1);
|
ei_x_print_reg_msg(&rbuf, module, 1);
|
||||||
#endif
|
#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);
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "rpc call: %s:%s(Ref)\n", module, function);
|
||||||
/* should lock with mutex? */
|
/* should lock with mutex? */
|
||||||
switch_mutex_lock(listener->sock_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);
|
switch_mutex_unlock(listener->sock_mutex);
|
||||||
/*
|
/*
|
||||||
char *argv[1];
|
char *argv[1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user