[asterisk-commits] russell: branch 1.2 r46964 - /branches/1.2/res/res_musiconhold.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Nov 2 10:47:59 MST 2006


Author: russell
Date: Thu Nov  2 11:47:56 2006
New Revision: 46964

URL: http://svn.digium.com/view/asterisk?rev=46964&view=rev
Log:
ignore files in a music on hold directory that begin with '.'
(issue #8249, cboie)

Modified:
    branches/1.2/res/res_musiconhold.c

Modified: branches/1.2/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/res/res_musiconhold.c?rev=46964&r1=46963&r2=46964&view=diff
==============================================================================
--- branches/1.2/res/res_musiconhold.c (original)
+++ branches/1.2/res/res_musiconhold.c Thu Nov  2 11:47:56 2006
@@ -770,6 +770,10 @@
 	memset(class->filearray, 0, MAX_MOHFILES*MAX_MOHFILE_LEN);
 	while ((files_dirent = readdir(files_DIR))) {
 		if ((strlen(files_dirent->d_name) < 4) || ((strlen(files_dirent->d_name) + dirnamelen) >= MAX_MOHFILE_LEN))
+			continue;
+
+		/* Skip files that start with a dot */
+		if (files_dirent->d_name[0] == '.')
 			continue;
 
 		snprintf(filepath, MAX_MOHFILE_LEN, "%s/%s", class->dir, files_dirent->d_name);



More information about the asterisk-commits mailing list