Summary: | ASTERISK-15696: [patch] moh files install under datadir, at runtime: under varlibdir | ||
Reporter: | Tzafrir Cohen (tzafrir) | Labels: | |
Date Opened: | 2010-02-25 15:45:02.000-0600 | Date Closed: | 2010-10-16 06:52:03 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_musiconhold |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) moh_datadir | |
Description: | In sounds/Makefile , the moh files are installed to: MOH_DIR:=$(DESTDIR)$(ASTDATADIR)/moh However in res/res_musiconhold.c , in moh_scan_files we have (1.6.2) - if (class->dir[0] != '/') { ast_copy_string(dir_path, ast_config_AST_VAR_DIR, sizeof(dir_path)); strncat(dir_path, "/", sizeof(dir_path) - 1); strncat(dir_path, class->dir, sizeof(dir_path) - 1); Thus if astdatadir != astvarrundir , res_musiconh will fail to find the files with the default configuration. | ||
Comments: | By: Tzafrir Cohen (tzafrir) 2010-03-06 15:06:26.000-0600 I decided to patch res_musiconhold.c . Note that this bug was introduced when support for relative pathes in musiconhold.conf was added (r149917 , Nov. 2008). By: Digium Subversion (svnbot) 2010-10-16 05:03:05 Repository: asterisk Revision: 292049 U branches/1.6.2/configs/musiconhold.conf.sample U branches/1.6.2/res/res_musiconhold.c ------------------------------------------------------------------------ r292049 | tzafrir | 2010-10-16 05:03:05 -0500 (Sat, 16 Oct 2010) | 15 lines Base directory for MOH should be ASTDATADIR 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 ASTERISK-15696) Patches: moh_datadir uploaded by tzafrir (license 46) Review: https://reviewboard.asterisk.org/r/974/ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=292049 By: Digium Subversion (svnbot) 2010-10-16 05:47:01 Repository: asterisk Revision: 292050 _U branches/1.8/ U branches/1.8/configs/musiconhold.conf.sample U branches/1.8/res/res_musiconhold.c ------------------------------------------------------------------------ r292050 | tzafrir | 2010-10-16 05:47:01 -0500 (Sat, 16 Oct 2010) | 22 lines Merged revisions 292049 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r292049 | tzafrir | 2010-10-16 12:03:04 +0200 (?\215?\169', 16 ?\215?\144?\215?\149?\215?\167 2010) | 15 lines Base directory for MOH should be ASTDATADIR 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 ASTERISK-15696) Patches: moh_datadir uploaded by tzafrir (license 46) Review: https://reviewboard.asterisk.org/r/974/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=292050 By: Digium Subversion (svnbot) 2010-10-16 06:51:59 Repository: asterisk Revision: 292052 _U trunk/ U trunk/configs/musiconhold.conf.sample U trunk/res/res_musiconhold.c ------------------------------------------------------------------------ r292052 | tzafrir | 2010-10-16 06:51:58 -0500 (Sat, 16 Oct 2010) | 29 lines Merged revisions 292050 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r292050 | tzafrir | 2010-10-16 12:47:00 +0200 (?\215?\169', 16 ?\215?\144?\215?\149?\215?\167 2010) | 22 lines Merged revisions 292049 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r292049 | tzafrir | 2010-10-16 12:03:04 +0200 (?\215?\169', 16 ?\215?\144?\215?\149?\215?\167 2010) | 15 lines Base directory for MOH should be ASTDATADIR 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 ASTERISK-15696) Patches: moh_datadir uploaded by tzafrir (license 46) Review: https://reviewboard.asterisk.org/r/974/ ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=292052 |