]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
always use default state handlers in addition to passed arg
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 27 Oct 2009 15:59:25 +0000 (15:59 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 27 Oct 2009 15:59:25 +0000 (15:59 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15250 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_originate.c

index c7dbaf8afbd2fee21e6f8ba65b611ff6f3a914ad..fbf4f61322ea1b7a3683d33188112d60d2fca27d 100644 (file)
@@ -1788,14 +1788,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                        }
                                }
 
-                               if (!table) {
-                                       table = &originate_state_handlers;
-                               }
-
                                if (table) {
                                        switch_channel_add_state_handler(originate_status[i].peer_channel, table);
                                }
 
+                               switch_channel_add_state_handler(originate_status[i].peer_channel, &originate_state_handlers);
+
                                if ((flags & SOF_NOBLOCK) && originate_status[i].peer_session) {
                                        status = SWITCH_STATUS_SUCCESS;
                                        *bleg = originate_status[i].peer_session;