From b9a858317881315c52cd33c61d90b1e6c75156bd Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Tue, 11 Feb 2014 15:50:50 +0000 Subject: [PATCH] Add vm-domain-storage-dir param This replaces the semantics of the storage-dir parameter without the deprecation notice. The behavior of storage-dir never should have been deprecated, though it was probably correct to deprecate the name itself. Rather than having both vm-storage-dir and vm-domain-storage-dir it might be nice if the config system could just notice at what level it was defined and do the right thing. Indeed, this is why I'd left things as-is for so long. But as Master Foo famously said, "which one will reach the other side of the river: the one who dreams of a raft, or the one that hitchhikes to the next bridge?" FS-5329 --- src/mod/applications/mod_voicemail/mod_voicemail.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index a800efa855..b3ed3e5bd2 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -2524,9 +2524,11 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p convert_ext = switch_core_session_strdup(session, val); } else if (!strcasecmp(var, "vm-storage-dir")) { vm_storage_dir = switch_core_session_strdup(session, val); + } else if (!strcasecmp(var, "vm-domain-storage-dir")) { + storage_dir = switch_core_session_strdup(session, val); } else if (!strcasecmp(var, "storage-dir")) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, - "Using deprecated 'storage-dir' directory variable: Please use 'vm-storage-dir'.\n"); + "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, "timezone")) { switch_channel_set_variable(channel, var, val); @@ -2774,9 +2776,11 @@ static switch_status_t deliver_vm(vm_profile_t *profile, send_mail++; } else if (!strcasecmp(var, "vm-storage-dir")) { vm_storage_dir = switch_core_strdup(pool, val); + } else if (!strcasecmp(var, "vm-domain-storage-dir")) { + storage_dir = switch_core_session_strdup(session, val); } else if (!strcasecmp(var, "storage-dir")) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, - "Using deprecated 'storage-dir' directory variable: Please use 'vm-storage-dir'.\n"); + "Using deprecated 'storage-dir' directory variable: Please use 'vm-domain-storage-dir'.\n"); storage_dir = switch_core_strdup(pool, val); } else if (!strcasecmp(var, "vm-notify-email-all-messages") && (send_notify = switch_true(val))) { send_mail++; @@ -3405,9 +3409,11 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p 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")) { + storage_dir = switch_core_session_strdup(session, val); } else if (!strcasecmp(var, "storage-dir")) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, - "Using deprecated 'storage-dir' directory variable: Please use 'vm-storage-dir'.\n"); + "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++;