]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
remove unnecessary line and add NULL check
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 7 Dec 2009 19:07:53 +0000 (19:07 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 7 Dec 2009 19:07:53 +0000 (19:07 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15832 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_commands/mod_commands.c
src/switch_channel.c

index 8537ef87f9430a569631fab1345ade43fe2ea345..ee2f7a4f0e348a44649cde83c2c82d227da56d85 100644 (file)
@@ -2500,7 +2500,6 @@ SWITCH_STANDARD_API(originate_function)
        }
 
        caller_channel = switch_core_session_get_channel(caller_session);
-       switch_channel_clear_state_handler(caller_channel, NULL);
 
        if (*exten == '&' && *(exten + 1)) {
                switch_caller_extension_t *extension = NULL;
index 5989edab9747ca82fb43294358cb34133c8442e3..ba5be9a0a297fee282d3ad4c0e9bf32777a2fd08 100644 (file)
@@ -1747,7 +1747,7 @@ SWITCH_DECLARE(void) switch_channel_clear_state_handler(switch_channel_t *channe
                }
        } else {
                for (index = 0; index < i; index++) {
-                       if (switch_test_flag(channel->state_handlers[index], SSH_FLAG_STICKY)) {
+                       if (channel->state_handlers[index] && switch_test_flag(channel->state_handlers[index], SSH_FLAG_STICKY)) {
                                new_handlers[channel->state_handler_index++] = channel->state_handlers[index];
                        }
                }