]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
tests: use datadir for sound files 77/4777/1
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>
Sat, 21 Jan 2017 20:43:48 +0000 (22:43 +0200)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 24 Jan 2017 14:34:57 +0000 (08:34 -0600)
Some (voicemail-related) tests API symlinks beep.gsm and other files
from ast_config_AST_VAR_DIR. It should use ast_config_AST_DATA_DIR.

ASTERISK-26740 #close

Change-Id: Id49c56fb9e16df64b1a2b829693ca7601252df89

apps/app_voicemail.c
tests/test_voicemail_api.c

index bee684e4e319b67e0ecd3cae4ed04b76ccaec26e..1c75105dd379db8bc8ae7c8bd6e754544d917fca 100644 (file)
@@ -14316,7 +14316,7 @@ AST_TEST_DEFINE(test_voicemail_vmsayname)
                                ast_log(AST_LOG_WARNING, "Failed to make test directory\n");
                                goto exit_vmsayname_test;
                        }
-                       snprintf(dir, sizeof(dir), "%s/sounds/beep.gsm", ast_config_AST_VAR_DIR);
+                       snprintf(dir, sizeof(dir), "%s/sounds/beep.gsm", ast_config_AST_DATA_DIR);
                        snprintf(dir2, sizeof(dir2), "%s%s/%s/greet.gsm", VM_SPOOL_DIR, TEST_CONTEXT, TEST_EXTENSION);
                        /* we're not going to hear the sound anyway, just use a valid gsm audio file */
                        if ((res = symlink(dir, dir2))) {
@@ -14562,8 +14562,8 @@ AST_TEST_DEFINE(test_voicemail_notify_endl)
                break;
        }
 
-       snprintf(attach, sizeof(attach), "%s/sounds/en/tt-weasels", ast_config_AST_VAR_DIR);
-       snprintf(attach2, sizeof(attach2), "%s/sounds/en/tt-somethingwrong", ast_config_AST_VAR_DIR);
+       snprintf(attach, sizeof(attach), "%s/sounds/en/tt-weasels", ast_config_AST_DATA_DIR);
+       snprintf(attach2, sizeof(attach2), "%s/sounds/en/tt-somethingwrong", ast_config_AST_DATA_DIR);
 
        if (!(vmu = find_user(&vmus, testcontext, testmailbox)) &&
                !(vmu = find_or_create(testcontext, testmailbox))) {
index aba1b6419fa8e9f6f79f5f2b765350a9c23a49ef..1b03e5431eabffb669459739152574307143e926 100644 (file)
@@ -462,7 +462,7 @@ static int test_vm_api_create_voicemail_files(const char *context, const char *m
                folder_path, snapshot->msg_number);
        snprintf(snd_path, sizeof(snd_path), "%s/msg%04u.gsm",
                folder_path, snapshot->msg_number);
-       snprintf(beep_path, sizeof(beep_path), "%s/sounds/en/beep.gsm", ast_config_AST_VAR_DIR);
+       snprintf(beep_path, sizeof(beep_path), "%s/sounds/en/beep.gsm", ast_config_AST_DATA_DIR);
 
        if (test_vm_api_create_voicemail_folder(folder_path)) {
                return 1;