]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID:1024582 Logically dead code
authorMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 19:27:25 +0000 (19:27 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 19:27:25 +0000 (19:27 +0000)
src/mod/applications/mod_commands/mod_commands.c

index 3eefece4a833aaa9f462a332eb98adb638b2be78..0d826f3c2abe2d4830c1a0bc5890f8784516bd10 100644 (file)
@@ -4252,7 +4252,6 @@ SWITCH_STANDARD_API(originate_function)
        char *aleg, *exten, *dp, *context, *cid_name, *cid_num;
        uint32_t timeout = 60;
        switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
-       uint8_t machine = 1;
        switch_status_t status = SWITCH_STATUS_SUCCESS;
 
        if (zstr(cmd)) {
@@ -4280,11 +4279,6 @@ SWITCH_STANDARD_API(originate_function)
                }
        }
 
-       if (argv[0] && !strcasecmp(argv[0], "machine")) {
-               machine = 1;
-               i++;
-       }
-
        aleg = argv[i++];
        exten = argv[i++];
        dp = argv[i++];
@@ -4306,11 +4300,7 @@ SWITCH_STANDARD_API(originate_function)
 
        if (switch_ivr_originate(NULL, &caller_session, &cause, aleg, timeout, NULL, cid_name, cid_num, NULL, NULL, SOF_NONE, NULL) != SWITCH_STATUS_SUCCESS
                || !caller_session) {
-               if (machine) {
                        stream->write_function(stream, "-ERR %s\n", switch_channel_cause2str(cause));
-               } else {
-                       stream->write_function(stream, "-ERR Cannot create outgoing channel! [%s] cause: %s\n", aleg, switch_channel_cause2str(cause));
-               }
                goto done;
        }
 
@@ -4340,11 +4330,7 @@ SWITCH_STANDARD_API(originate_function)
                switch_ivr_session_transfer(caller_session, exten, dp, context);
        }
 
-       if (machine) {
-               stream->write_function(stream, "+OK %s\n", switch_core_session_get_uuid(caller_session));
-       } else {
-               stream->write_function(stream, "+OK Created session: %s\n", switch_core_session_get_uuid(caller_session));
-       }
+       stream->write_function(stream, "+OK %s\n", switch_core_session_get_uuid(caller_session));
 
        switch_core_session_rwunlock(caller_session);