提交 b9a85831 authored 作者: Travis Cross's avatar Travis Cross

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
上级 d3b9aaba
...@@ -2524,9 +2524,11 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p ...@@ -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); convert_ext = switch_core_session_strdup(session, val);
} else if (!strcasecmp(var, "vm-storage-dir")) { } else if (!strcasecmp(var, "vm-storage-dir")) {
vm_storage_dir = switch_core_session_strdup(session, val); 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")) { } else if (!strcasecmp(var, "storage-dir")) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, 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); storage_dir = switch_core_session_strdup(session, val);
} else if (!strcasecmp(var, "timezone")) { } else if (!strcasecmp(var, "timezone")) {
switch_channel_set_variable(channel, var, val); switch_channel_set_variable(channel, var, val);
...@@ -2774,9 +2776,11 @@ static switch_status_t deliver_vm(vm_profile_t *profile, ...@@ -2774,9 +2776,11 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
send_mail++; send_mail++;
} else if (!strcasecmp(var, "vm-storage-dir")) { } else if (!strcasecmp(var, "vm-storage-dir")) {
vm_storage_dir = switch_core_strdup(pool, val); 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")) { } else if (!strcasecmp(var, "storage-dir")) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, 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); storage_dir = switch_core_strdup(pool, val);
} else if (!strcasecmp(var, "vm-notify-email-all-messages") && (send_notify = switch_true(val))) { } else if (!strcasecmp(var, "vm-notify-email-all-messages") && (send_notify = switch_true(val))) {
send_mail++; send_mail++;
...@@ -3405,9 +3409,11 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p ...@@ -3405,9 +3409,11 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
send_mail++; send_mail++;
} else if (!strcasecmp(var, "vm-storage-dir")) { } else if (!strcasecmp(var, "vm-storage-dir")) {
vm_storage_dir = switch_core_session_strdup(session, val); 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")) { } else if (!strcasecmp(var, "storage-dir")) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, 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); storage_dir = switch_core_session_strdup(session, val);
} else if (!strcasecmp(var, "vm-notify-email-all-messages") && (send_notify = switch_true(val))) { } else if (!strcasecmp(var, "vm-notify-email-all-messages") && (send_notify = switch_true(val))) {
send_mail++; send_mail++;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论