Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c (17410 => 17411)
--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c 2010-04-26 21:38:05 UTC (rev 17410)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c 2010-04-26 23:17:39 UTC (rev 17411)
@@ -1524,7 +1524,7 @@
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);