]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODAPP-403
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 26 Apr 2010 23:17:39 +0000 (18:17 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 26 Apr 2010 23:17:39 +0000 (18:17 -0500)
src/mod/applications/mod_voicemail/mod_voicemail.c

index abdda0a9e8e5f3d96261f2db54328c667a1a57cc..b919b17c58a1fad596119a807c5935d6cf9f0ea5 100644 (file)
@@ -1524,7 +1524,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
                                        TRY_CODE(switch_ivr_phrase_macro(session, VM_INVALID_EXTENSION_MACRO, vm_cc, NULL, NULL));
                                        goto get_exten;
                                }
-                       } else if (!strcmp(input, profile->delete_file_key) || !strcmp(input, profile->email_key)) {
+                       } else if (!strcmp(input, profile->delete_file_key) || (!strcmp(input, profile->email_key) && !zstr(cbt->email))) {
                                char *sql = switch_mprintf("update voicemail_msgs set flags='delete' where uuid='%s'", cbt->uuid);
                                vm_execute_sql(profile, sql, profile->mutex);
                                switch_safe_free(sql);