]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix regression from r12585 FSCORE-331
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 21 Mar 2009 16:47:16 +0000 (16:47 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 21 Mar 2009 16:47:16 +0000 (16:47 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12704 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_originate.c

index 221733a4d0f7f82a17e4b6b748197e811eae5340..90f1f4615347e29a550947b72fd71020b39dbc4d 100644 (file)
@@ -2142,11 +2142,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
        }
 
        if (*bleg) {
-               if (caller_channel && !switch_channel_get_originatee_caller_profile(caller_channel)) {
+               if (session && caller_channel && !switch_channel_get_originatee_caller_profile(caller_channel)) {
                        switch_caller_profile_t *cloned_profile, *peer_profile = switch_channel_get_caller_profile(switch_core_session_get_channel(*bleg));
                        
                        if (peer_profile) {
-                               if ((cloned_profile = switch_caller_profile_clone(*bleg, peer_profile)) != 0) {
+                               if ((cloned_profile = switch_caller_profile_clone(session, peer_profile)) != 0) {
                                        switch_channel_set_originatee_caller_profile(caller_channel, cloned_profile);
                                }
                        }