Bugzilla Bug 255633: allow hyphen (-) and underscore (_) in log module

names.  The patch is contributed by Ed Catmur <ed@catmur.co.uk>. r=wtc.


git-svn-id: svn://10.0.0.236/trunk@170472 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtchang%redhat.com
2005-03-09 22:34:20 +00:00
parent 8806db000a
commit 4d77bafb96

View File

@@ -219,7 +219,7 @@ void _PR_InitLog(void)
PRInt32 bufSize = DEFAULT_BUF_SIZE;
while (pos < evlen) {
PRIntn level = 1, count = 0, delta = 0;
count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]%n:%d%n",
count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_]%n:%d%n",
module, &delta, &level, &delta);
pos += delta;
if (count == 0) break;
@@ -328,7 +328,7 @@ static void _PR_SetLogModuleLevel( PRLogModuleInfo *lm )
while (pos < evlen) {
PRIntn level = 1, count = 0, delta = 0;
count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]%n:%d%n",
count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_]%n:%d%n",
module, &delta, &level, &delta);
pos += delta;
if (count == 0) break;