提交 671694fb authored 作者: Andrew Thompson's avatar Andrew Thompson

Deprecate new_pid message in favor of get_pid which has an extra element, the call's UUID


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14877 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 b01c6656
...@@ -1203,6 +1203,19 @@ session_elem_t* attach_call_to_spawned_process(listener_t* listener, char *modul ...@@ -1203,6 +1203,19 @@ session_elem_t* attach_call_to_spawned_process(listener_t* listener, char *modul
ei_x_buff rbuf; ei_x_buff rbuf;
ei_x_new_with_version(&rbuf); ei_x_new_with_version(&rbuf);
ei_x_encode_tuple_header(&rbuf, 4);
ei_x_encode_atom(&rbuf, "get_pid");
_ei_x_encode_string(&rbuf, switch_core_session_get_uuid(session));
ei_x_encode_ref(&rbuf, &ref);
ei_x_encode_pid(&rbuf, ei_self(listener->ec));
/* should lock with mutex? */
ei_reg_send(listener->ec, listener->sockfd, module, rbuf.buff, rbuf.index);
#ifdef EI_DEBUG
ei_x_print_reg_msg(&rbuf, module, 1);
#endif
ei_x_free(&rbuf);
ei_x_new_with_version(&rbuf);
ei_x_encode_tuple_header(&rbuf, 3); ei_x_encode_tuple_header(&rbuf, 3);
ei_x_encode_atom(&rbuf, "new_pid"); ei_x_encode_atom(&rbuf, "new_pid");
ei_x_encode_ref(&rbuf, &ref); ei_x_encode_ref(&rbuf, &ref);
...@@ -1212,6 +1225,7 @@ session_elem_t* attach_call_to_spawned_process(listener_t* listener, char *modul ...@@ -1212,6 +1225,7 @@ session_elem_t* attach_call_to_spawned_process(listener_t* listener, char *modul
#ifdef EI_DEBUG #ifdef EI_DEBUG
ei_x_print_reg_msg(&rbuf, module, 1); ei_x_print_reg_msg(&rbuf, module, 1);
#endif #endif
ei_x_free(&rbuf); ei_x_free(&rbuf);
} else { } else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "rpc call: %s:%s(Ref)\n", module, function); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "rpc call: %s:%s(Ref)\n", module, function);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论