[xiph-commits] r18904 - icecast/trunk/icecast/src
ph3-der-loewe at svn.xiph.org
ph3-der-loewe at svn.xiph.org
Tue Apr 2 17:46:55 PDT 2013
Author: ph3-der-loewe
Date: 2013-04-02 17:46:55 -0700 (Tue, 02 Apr 2013)
New Revision: 18904
Modified:
icecast/trunk/icecast/src/cfgfile.c
Log:
do fuzzy(fnmatch) matching for mountpoint names of non-normal mounts, see #1914
Modified: icecast/trunk/icecast/src/cfgfile.c
===================================================================
--- icecast/trunk/icecast/src/cfgfile.c 2013-04-03 00:33:10 UTC (rev 18903)
+++ icecast/trunk/icecast/src/cfgfile.c 2013-04-03 00:46:55 UTC (rev 18904)
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <fnmatch.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
@@ -1239,8 +1240,11 @@
if (mount == NULL || mountinfo->mountname == NULL)
break;
- if (strcmp (mountinfo->mountname, mount) == 0)
+ if (mountinfo->mounttype == MOUNT_TYPE_NORMAL && strcmp (mountinfo->mountname, mount) == 0)
break;
+
+ if (fnmatch(mountinfo->mountname, mount, FNM_PATHNAME) == 0)
+ break;
}
/* retry with default mount */
More information about the commits
mailing list