]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Base directory for MOH should be ASTDATADIR
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>
Sat, 16 Oct 2010 10:03:04 +0000 (10:03 +0000)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Sat, 16 Oct 2010 10:03:04 +0000 (10:03 +0000)
If the directive 'directory' is relative, make it relative to the
datadir, rather than to the varlibdir. In the sample configuration
it is relative ('moh').

This has no effect unless you have actively set the datadir explicitly
(at build time or at run time).

(closes issue #16906)
Patches:
      moh_datadir uploaded by tzafrir (license 46)

Review: https://reviewboard.asterisk.org/r/974/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@292049 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configs/musiconhold.conf.sample
res/res_musiconhold.c

index 8ccc851e4fa9edcd933882b705c6ad396af44388..c7d2b1859e2578ac361d1e98fa98d176212d5940 100644 (file)
@@ -31,7 +31,7 @@
 ;
 ; The path specified can be either an absolute path (starts with '/'),
 ; or a relative path; relative paths are interpreted as being relative
-; to the 'astvarlibdir' in asterisk.conf, which defaults to
+; to the 'astdatalibdir' in asterisk.conf, which defaults to
 ; /var/lib/asterisk.
 ;
 ; NOTE:
index fcae10f0e5d927872e808f9ac3ed6db754d2ea4d..7499abde76b22ed9e5104dc12ad7b75b3cf780df 100644 (file)
@@ -989,7 +989,7 @@ static int moh_scan_files(struct mohclass *class) {
        int i;
 
        if (class->dir[0] != '/') {
-               ast_copy_string(dir_path, ast_config_AST_VAR_DIR, sizeof(dir_path));
+               ast_copy_string(dir_path, ast_config_AST_DATA_DIR, sizeof(dir_path));
                strncat(dir_path, "/", sizeof(dir_path) - 1);
                strncat(dir_path, class->dir, sizeof(dir_path) - 1);
        } else {