[Asterisk-code-review] tests: use datadir for sound files (asterisk[14])

Anonymous Coward asteriskteam at digium.com
Fri Jan 27 14:50:26 CST 2017


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/4778 )

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:
  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 300dc18..fe76bc0 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -14395,7 +14395,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))) {
@@ -14641,8 +14641,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 fc371ba..8c173d0 100644
--- a/tests/test_voicemail_api.c
+++ b/tests/test_voicemail_api.c
@@ -462,7 +462,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/4778
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id49c56fb9e16df64b1a2b829693ca7601252df89
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Tzafrir Cohen <tzafrir.cohen at xorcom.com>



More information about the asterisk-code-review mailing list