commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1003770 - in /commons/proper/daemon/trunk: RELEASE-NOTES.txt src/native/windows/src/service.c
Date Sat, 02 Oct 2010 10:44:06 GMT
Author: mturk
Date: Sat Oct  2 10:44:05 2010
New Revision: 1003770

URL: http://svn.apache.org/viewvc?rev=1003770&view=rev
Log:
Partially fix DAEMON-164, The service names cannot have spaces however

Modified:
    commons/proper/daemon/trunk/RELEASE-NOTES.txt
    commons/proper/daemon/trunk/src/native/windows/src/service.c

Modified: commons/proper/daemon/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/RELEASE-NOTES.txt?rev=1003770&r1=1003769&r2=1003770&view=diff
==============================================================================
--- commons/proper/daemon/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/daemon/trunk/RELEASE-NOTES.txt Sat Oct  2 10:44:05 2010
@@ -46,7 +46,7 @@ NEW FEATURES:
 
 BUG FIXES:
 
-1.0.4: DAEMON-95, DAEMON-171, DAEMON-100, DAEMON-165
+1.0.4: DAEMON-95, DAEMON-171, DAEMON-100, DAEMON-164, DAEMON-165
 
 1.0.3: DAEMON-108, DAEMON-128, DAEMON-139, DAEMON-143, DAEMON-148,
        DAEMON-135, DAEMON-155, DAEMON-159, DAEMON-161, DAEMON-145, DAEMON-146,

Modified: commons/proper/daemon/trunk/src/native/windows/src/service.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/service.c?rev=1003770&r1=1003769&r2=1003770&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/src/service.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/src/service.c Sat Oct  2 10:44:05 2010
@@ -41,12 +41,16 @@ typedef struct APXSERVICE {
 
 static BOOL __apxIsValidServiceName(LPCWSTR szServiceName)
 {
-    do {
-        if (!IsCharAlphaNumericW(*szServiceName)) {
-            apxDisplayError(FALSE, NULL, 0, "NonAlpha %d", *szServiceName);
+    WCHAR ch;
+    int   i = 0;
+    while ((ch = szServiceName[i++])) {
+        if (ch == L'/' || ch == '\\' ||
+            ch == L' ') {
+            apxDisplayError(FALSE, NULL, 0, "Invalid service (%S) char '%C' detected",
+                            szServiceName, ch);
             return FALSE;
         }
-    } while( *(++szServiceName));
+    }
     return TRUE;
 }
 



Mime
View raw message