commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r909121 - /commons/proper/daemon/trunk/src/native/nt/procrun/src/cmdline.c
Date Thu, 11 Feb 2010 19:45:05 GMT
Author: mturk
Date: Thu Feb 11 19:45:05 2010
New Revision: 909121

URL: http://svn.apache.org/viewvc?rev=909121&view=rev
Log:
Fix DAEMON-49 by applying the provided patch by Robert Longson

Modified:
    commons/proper/daemon/trunk/src/native/nt/procrun/src/cmdline.c

Modified: commons/proper/daemon/trunk/src/native/nt/procrun/src/cmdline.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/nt/procrun/src/cmdline.c?rev=909121&r1=909120&r2=909121&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/nt/procrun/src/cmdline.c (original)
+++ commons/proper/daemon/trunk/src/native/nt/procrun/src/cmdline.c Thu Feb 11 19:45:05 2010
@@ -265,14 +265,17 @@
             lpCmdline->lpOptions[i].szValue = apxPoolStrdupW(lpCmdline->hPool, szVar);
             lpCmdline->lpOptions[i].dwType |= APXCMDOPT_FOUND;
         }
+        else if (l && (lpCmdline->lpOptions[i].dwType & APXCMDOPT_INT)) {
+            lpCmdline->lpOptions[i].dwValue = (DWORD)apxAtoulW(szVar);
+            lpCmdline->lpOptions[i].dwType |= APXCMDOPT_FOUND;
+        }
         else if (l && (lpCmdline->lpOptions[i].dwType & APXCMDOPT_MSZ)) {
             LPWSTR pp;
             BOOL insquote = FALSE, indquote = FALSE;
             DWORD sp = 0;
+            lpCmdline->lpOptions[i].dwValue = (lstrlenW(szVar) + 2) * sizeof(WCHAR);
             lpCmdline->lpOptions[i].szValue = apxPoolCalloc(lpCmdline->hPool,
-                                                            (lstrlenW(szVar) + 2) *
-                                                            sizeof(WCHAR));
-            lstrcpyW(lpCmdline->lpOptions[i].szValue, szVar);
+                                                    lpCmdline->lpOptions[i].dwValue);
             pp = szVar;
             while(*pp) {
                 if (*pp == L'\'')



Mime
View raw message