]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
we always have the session in the dialplan function
authorMichael Jerris <mike@jerris.com>
Wed, 30 Apr 2014 12:51:52 +0000 (08:51 -0400)
committerMichael Jerris <mike@jerris.com>
Wed, 30 Apr 2014 12:51:52 +0000 (08:51 -0400)
src/mod/applications/mod_lcr/mod_lcr.c

index 895b10db9c09a1f33dc3d8ff9534bb0a4664d556..53267d2049212358a7792ea851772f4b681fe0c0 100644 (file)
@@ -1555,20 +1555,13 @@ SWITCH_STANDARD_DIALPLAN(lcr_dialplan_hunt)
        switch_channel_t *channel = switch_core_session_get_channel(session);
        callback_t routes = { 0 };
        lcr_route cur_route = { 0 };
-       switch_memory_pool_t *pool = NULL;
+       switch_memory_pool_t *pool = switch_core_session_get_pool(session);
        switch_event_t *event = NULL;
        const char *intrastate = NULL;
        const char *intralata = NULL;
        const char *lrn = NULL;
 
-       if (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.session = session;
        routes.pool = pool;
 
        intrastate = switch_channel_get_variable(channel, "intrastate");