]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Add vm-domain-storage-dir param
authorTravis Cross <tc@traviscross.com>
Tue, 11 Feb 2014 15:50:50 +0000 (15:50 +0000)
committerTravis Cross <tc@traviscross.com>
Tue, 11 Feb 2014 15:53:03 +0000 (15:53 +0000)
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

index e2f9b7eb7953b83e4b35d005d0d3b2915c09ed1f..25a9a0cbb23b449501b138f5b1386eef39a9dfef 100644 (file)
@@ -2523,9 +2523,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);
@@ -2773,9 +2775,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++;
@@ -3404,9 +3408,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++;