提交 75084815 authored 作者: Michael Jerris's avatar Michael Jerris

we always have the seesion in the app function

上级 9bf98d0d
...@@ -1682,7 +1682,7 @@ SWITCH_STANDARD_APP(lcr_app_function) ...@@ -1682,7 +1682,7 @@ SWITCH_STANDARD_APP(lcr_app_function)
switch_caller_profile_t *caller_profile = NULL; switch_caller_profile_t *caller_profile = NULL;
callback_t routes = { 0 }; callback_t routes = { 0 };
lcr_route cur_route = { 0 }; lcr_route cur_route = { 0 };
switch_memory_pool_t *pool; switch_memory_pool_t *pool = switch_core_session_get_pool(session);
switch_event_t *event; switch_event_t *event;
const char *intra = NULL; const char *intra = NULL;
const char *lrn = NULL; const char *lrn = NULL;
...@@ -1691,18 +1691,9 @@ SWITCH_STANDARD_APP(lcr_app_function) ...@@ -1691,18 +1691,9 @@ SWITCH_STANDARD_APP(lcr_app_function)
return; return;
} }
if (session) { routes.session = session;
pool = switch_core_session_get_pool(session);
routes.session = session;
} else {
switch_core_new_memory_pool(&pool);
switch_event_create(&event, SWITCH_EVENT_MESSAGE);
routes.event = event;
}
routes.pool = pool; routes.pool = pool;
lrn = switch_channel_get_variable(channel, "lrn"); lrn = switch_channel_get_variable(channel, "lrn");
routes.lrn_number = (char *) lrn; routes.lrn_number = (char *) lrn;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论