commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1024539 - in /commons/proper/daemon/trunk: RELEASE-NOTES.txt src/native/windows/apps/prunsrv/prunsrv.c src/native/windows/include/apxwin.h src/native/windows/src/mclib.c
Date Wed, 20 Oct 2010 07:09:06 GMT
Author: mturk
Date: Wed Oct 20 07:09:05 2010
New Revision: 1024539

URL: http://svn.apache.org/viewvc?rev=1024539&view=rev
Log:
DAEMON-150 Use service 'name-' as log prefix instead fixed 'service-'

Modified:
    commons/proper/daemon/trunk/RELEASE-NOTES.txt
    commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c
    commons/proper/daemon/trunk/src/native/windows/include/apxwin.h
    commons/proper/daemon/trunk/src/native/windows/src/mclib.c

Modified: commons/proper/daemon/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/RELEASE-NOTES.txt?rev=1024539&r1=1024538&r2=1024539&view=diff
==============================================================================
--- commons/proper/daemon/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/daemon/trunk/RELEASE-NOTES.txt Wed Oct 20 07:09:05 2010
@@ -53,7 +53,7 @@ NEW FEATURES:
 BUG FIXES:
 
 1.0.4: DAEMON-95, DAEMON-171, DAEMON-100, DAEMON-164, DAEMON-165, DAEMON-175,
-       DAEMON-177
+       DAEMON-177, DAEMON-150
 
 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/apps/prunsrv/prunsrv.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c?rev=1024539&r1=1024538&r2=1024539&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c Wed Oct 20 07:09:05
2010
@@ -258,7 +258,7 @@ DWORD WINAPI eventThread(LPVOID lpParam)
  * If stderrfile is not specified it will
  * go to stdoutfile.
  */
-static BOOL redirectStdStreams(APX_STDWRAP *lpWrapper)
+static BOOL redirectStdStreams(APX_STDWRAP *lpWrapper, LPAPXCMDLINE lpCmdline)
 {
     BOOL aErr = FALSE;
     BOOL aOut = FALSE;
@@ -268,10 +268,14 @@ static BOOL redirectStdStreams(APX_STDWR
     /* redirect to file or console */
     if (lpWrapper->szStdOutFilename) {
         if (lstrcmpiW(lpWrapper->szStdOutFilename, PRSRV_AUTO) == 0) {
+            WCHAR lsn[1024];
             aOut = TRUE;
+            lstrcpyW(lsn, lpCmdline->szApplication);
+            lstrlocaseW(lsn);
+            lstrcatW(lsn, L"-stdout");
             lpWrapper->szStdOutFilename = apxLogFile(gPool,
                                                      lpWrapper->szLogPath,
-                                                     L"service-stdout",
+                                                     lsn,
                                                      NULL, TRUE);
         }
         /* Delete the file if not in append mode
@@ -290,10 +294,14 @@ static BOOL redirectStdStreams(APX_STDWR
     }
     if (lpWrapper->szStdErrFilename) {
         if (lstrcmpiW(lpWrapper->szStdErrFilename, PRSRV_AUTO) == 0) {
+            WCHAR lsn[1024];
             aErr = TRUE;
+            lstrcpyW(lsn, lpCmdline->szApplication);
+            lstrlocaseW(lsn);
+            lstrcatW(lsn, L"-stderr");
             lpWrapper->szStdErrFilename = apxLogFile(gPool,
                                                      lpWrapper->szLogPath,
-                                                     L"service-stderr",
+                                                     lsn,
                                                      NULL, TRUE);
         }
         if (!aErr)
@@ -1494,7 +1502,7 @@ void __cdecl main(int argc, char **argv)
         gStdwrap.szStdOutFilename = SO_STDOUTPUT;
         gStdwrap.szStdErrFilename = SO_STDERROR;
     }
-    redirectStdStreams(&gStdwrap);
+    redirectStdStreams(&gStdwrap, lpCmdline);
     if (lpCmdline->dwCmdIndex == 2) {
         SYSTEMTIME t;
         GetLocalTime(&t);

Modified: commons/proper/daemon/trunk/src/native/windows/include/apxwin.h
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/include/apxwin.h?rev=1024539&r1=1024538&r2=1024539&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/include/apxwin.h (original)
+++ commons/proper/daemon/trunk/src/native/windows/include/apxwin.h Wed Oct 20 07:09:05 2010
@@ -206,6 +206,7 @@ LPSTR   lstrlcatA(LPSTR dst, int siz, LP
 LPWSTR  lstrlcatW(LPWSTR dst, int siz, LPCWSTR src);
 LPSTR   lstrlcpyA(LPSTR dst, int siz, LPCSTR src);
 LPWSTR  lstrlcpyW(LPWSTR dst, int siz, LPCWSTR src);
+LPWSTR  lstrlocaseW(LPWSTR str);
 
 PSECURITY_ATTRIBUTES GetNullACL();
 void CleanNullACL(void *sa);

Modified: commons/proper/daemon/trunk/src/native/windows/src/mclib.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/mclib.c?rev=1024539&r1=1024538&r2=1024539&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/src/mclib.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/src/mclib.c Wed Oct 20 07:09:05 2010
@@ -407,3 +407,14 @@ lstrlcpyW(LPWSTR dst, int siz, LPCWSTR s
 
     return d;
 }
+
+LPWSTR
+lstrlocaseW(LPWSTR str)
+{
+    LPWSTR  p = str;
+    while (p && *p != 0) {
+        *p = towlower(*p);
+        p++;
+    }
+    return str;
+}



Mime
View raw message