[Asterisk-code-review] tests: use datadir for sound files (asterisk[master])
Anonymous Coward
asteriskteam at digium.com
Fri Jan 27 12:44:05 CST 2017
Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/4755 )
Change subject: tests: use datadir for sound files
......................................................................
tests: use datadir for sound files
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
---
M apps/app_voicemail.c
M tests/test_voicemail_api.c
2 files changed, 4 insertions(+), 4 deletions(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Matthew Fredrickson: Looks good to me, approved
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 03273c6..37f8aa9 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -14393,7 +14393,7 @@
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))) {
@@ -14639,8 +14639,8 @@
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))) {
diff --git a/tests/test_voicemail_api.c b/tests/test_voicemail_api.c
index 9cadf23..77b538e 100644
--- a/tests/test_voicemail_api.c
+++ b/tests/test_voicemail_api.c
@@ -460,7 +460,7 @@
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;
--
To view, visit https://gerrit.asterisk.org/4755
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id49c56fb9e16df64b1a2b829693ca7601252df89
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
More information about the asterisk-code-review
mailing list