[svn-commits] jpeeler: branch 1.4 r250786 - /branches/1.4/res/res_musiconhold.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Mar 4 19:03:08 CST 2010


Author: jpeeler
Date: Thu Mar  4 19:02:58 2010
New Revision: 250786

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=250786
Log:
Fix not being able to specify a URL in MOH class directory.

Don't attempt to chdir on a URL!

(closes issue #16875)
Reported by: raarts
Patches: 
      moh-http.patch uploaded by raarts (license 937)

Modified:
    branches/1.4/res/res_musiconhold.c

Modified: branches/1.4/res/res_musiconhold.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/res/res_musiconhold.c?view=diff&rev=250786&r1=250785&r2=250786
==============================================================================
--- branches/1.4/res/res_musiconhold.c (original)
+++ branches/1.4/res/res_musiconhold.c Thu Mar  4 19:02:58 2010
@@ -457,7 +457,7 @@
 #ifdef HAVE_CAP
 		cap_t cap;
 #endif
-		if (strcasecmp(class->dir, "nodir") && chdir(class->dir) < 0) {
+		if (strncasecmp(class->dir, "http://", 7) && strcasecmp(class->dir, "nodir") && chdir(class->dir) < 0) {
 			ast_log(LOG_WARNING, "chdir() failed: %s\n", strerror(errno));
 			_exit(1);
 		}




More information about the svn-commits mailing list