[asterisk-bugs] [Asterisk 0016906]: [patch] moh files install under datadir, at runtime: under varlibdir

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Oct 16 06:52:00 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16906 
====================================================================== 
Reported By:                tzafrir
Assigned To:                tzafrir
====================================================================== 
Project:                    Asterisk
Issue ID:                   16906
Category:                   Resources/res_musiconhold
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           1.6.2.3-rc2 
JIRA:                       SWP-980 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-02-25 15:45 CST
Last Modified:              2010-10-16 06:51 CDT
====================================================================== 
Summary:                    [patch] moh files install under datadir, at runtime:
under varlibdir
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.
====================================================================== 

---------------------------------------------------------------------- 
 (0128120) svnbot (reporter) - 2010-10-16 06:51
 https://issues.asterisk.org/view.php?id=16906#c128120 
---------------------------------------------------------------------- 
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 https://issues.asterisk.org/view.php?id=16906)
    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 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-10-16 06:51 svnbot         Checkin                                      
2010-10-16 06:51 svnbot         Note Added: 0128120                          
======================================================================




More information about the asterisk-bugs mailing list