]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6503 --resolve remove unused code
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 1 May 2014 19:00:13 +0000 (00:00 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 1 May 2014 20:28:44 +0000 (01:28 +0500)
src/mod/applications/mod_voicemail/mod_voicemail.c

index 7a4bf67a482cc6080ff8084b419d96cb0603be86..a9ff0a2ec30bdc1c486e62b9f8a9a7d2d6b15075 100644 (file)
@@ -3357,7 +3357,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
        switch_input_args_t args = { 0 };
        char *vm_email = NULL;
        char *vm_notify_email = NULL;
-       int send_mail = 0;
        cc_t cc = { 0 };
        char *read_flags = NORMAL_FLAG_STRING;
        const char *operator_ext = switch_channel_get_variable(channel, "vm_operator_extension");
@@ -3419,8 +3418,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
                                                skip_instructions = switch_true(val);
                                        } else if (!strcasecmp(var, "email-addr")) {
                                                email_addr = switch_core_session_strdup(session, val);
-                                       } else if (!strcasecmp(var, "vm-email-all-messages") && (send_main = switch_true(val))) {
-                                               send_mail++;
                                        } else if (!strcasecmp(var, "vm-storage-dir")) {
                                                vm_storage_dir = switch_core_session_strdup(session, val);
                                        } else if (!strcasecmp(var, "vm-domain-storage-dir")) {
@@ -3429,8 +3426,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING,
                                                                                  "Using deprecated 'storage-dir' directory variable: Please use 'vm-domain-storage-dir'.\n");
                                                storage_dir = switch_core_session_strdup(session, val);
-                                       } else if (!strcasecmp(var, "vm-notify-email-all-messages") && (send_notify = switch_true(val))) {
-                                               send_mail++;
                                        } else if (!strcasecmp(var, "vm-disk-quota")) {
                                                disk_quota = atoi(val);
                                        } else if (!strcasecmp(var, "vm-alternate-greet-id")) {
@@ -3466,12 +3461,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
                                }
                        }
 
-                       if (send_mail && (!(send_main || send_notify))) {
-                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING,
-                                                                 "Falling back to leaving message locally due to too many misconfiguration.\n");
-                               send_mail = 0;
-                       }
-
                } else {
                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Can't find user [%s@%s]\n", id, domain_name);
                        ok = 0;
@@ -3578,7 +3567,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
                                        if (argc >= 1 && argc <= 4) {
                                                switch_ivr_session_transfer(session, argv[0], argv[1], argv[2]);
                                                /* the application still runs after we leave it so we need to make sure that we don't do anything evil */
-                                               send_mail = 0;
                                                goto end;
                                        }
                                }
@@ -3592,7 +3580,6 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
                                        if (argc >= 1 && argc <= 4) {
                                                switch_ivr_session_transfer(session, argv[0], argv[1], argv[2]);
                                                /* the application still runs after we leave it so we need to make sure that we don't do anything evil */
-                                               send_mail = 0;
                                                goto end;
                                        }
                                }