mturk 2004/04/09 05:23:23
Modified: daemon/src/native/nt/procrun/apps/prunmgr prunmgr.c
Log:
Fix wrongly displayed 'Disabled' instead 'Stopped' status.
Revision Changes Path
1.2 +32 -27
jakarta-commons/daemon/src/native/nt/procrun/apps/prunmgr/prunmgr.c
Index: prunmgr.c
===================================================================
RCS file:
/home/cvs/jakarta-commons/daemon/src/native/nt/procrun/apps/prunmgr/prunmgr.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- prunmgr.c 7 Apr 2004 11:22:45 -0000 1.1
+++ prunmgr.c 9 Apr 2004 12:23:23 -0000 1.2
@@ -71,20 +71,20 @@
static LPCWSTR _s_java = L"Java";
static LPCWSTR _s_start = L"Start";
static LPCWSTR _s_stop = L"Stop";
-
-/* Allowed procrun commands */
-static LPCWSTR _commands[] = {
- L"ES", /* 1 Manage Service (default)*/
- L"MS", /* 2 Monitor Service */
- NULL
-};
-
-/* Allowed procrun parameters */
-static APXCMDLINEOPT _options[] = {
-/* 0 */ { L"AllowMultiInstances", NULL, NULL, APXCMDOPT_INT, NULL, 0},
- /* NULL terminate the array */
- { NULL }
-};
+
+/* Allowed procrun commands */
+static LPCWSTR _commands[] = {
+ L"ES", /* 1 Manage Service (default)*/
+ L"MS", /* 2 Monitor Service */
+ NULL
+};
+
+/* Allowed procrun parameters */
+static APXCMDLINEOPT _options[] = {
+/* 0 */ { L"AllowMultiInstances", NULL, NULL, APXCMDOPT_INT, NULL, 0},
+ /* NULL terminate the array */
+ { NULL }
+};
/* Create RBUTTON try menu
* Configure... (default, or lbutton dblclick)
@@ -528,10 +528,10 @@
case SERVICE_STOPPED:
if (_currentEntry->lpConfig->dwStartType != SERVICE_DISABLED) {
Button_Enable(GetDlgItem(hDlg, IDC_PPSGSTART), TRUE);
- SetDlgItemText(hDlg, IDC_PPSGSTATUS, STAT_DISABLED);
+ SetDlgItemText(hDlg, IDC_PPSGSTATUS, STAT_STOPPED);
}
else
- SetDlgItemText(hDlg, IDC_PPSGSTATUS, STAT_STOPPED);
+ SetDlgItemText(hDlg, IDC_PPSGSTATUS, STAT_DISABLED);
break;
default:
break;
@@ -1043,6 +1043,11 @@
if (IsDlgButtonChecked(hDlg, IDC_PPJAUTO)) {
EnableWindow(GetDlgItem(hDlg, IDC_PPJJVM), FALSE);
EnableWindow(GetDlgItem(hDlg, IDC_PPJBJVM), FALSE);
+ lpBuf = apxGetJavaSoftRuntimeLib(hPool);
+ if (lpBuf) {
+ SetDlgItemTextW(hDlg, IDC_PPJJVM, lpBuf);
+ apxFree(lpBuf);
+ }
}
else {
EnableWindow(GetDlgItem(hDlg, IDC_PPJJVM), TRUE);
@@ -1572,24 +1577,24 @@
#endif
{
MSG msg;
- LPAPXCMDLINE lpCmdline;
+ LPAPXCMDLINE lpCmdline;
HANDLE mutex = NULL;
apxHandleManagerInitialize();
hPool = apxPoolCreate(NULL, 0);
- /* Parse the command line */
- if ((lpCmdline = apxCmdlineParse(hPool, _options, _commands)) == NULL) {
- /* TODO: dispalay error message */
- apxDisplayError(TRUE, NULL, 0, "Error parsing command line");
+ /* Parse the command line */
+ if ((lpCmdline = apxCmdlineParse(hPool, _options, _commands)) == NULL) {
+ /* TODO: dispalay error message */
+ apxDisplayError(TRUE, NULL, 0, "Error parsing command line");
goto cleanup;
}
if (!lpCmdline->dwCmdIndex) {
/* Skip sytem error message */
SetLastError(ERROR_SUCCESS);
- apxDisplayError(TRUE, NULL, 0,
- apxLoadResourceA(IDS_ERRORCMD, 0),
+ apxDisplayError(TRUE, NULL, 0,
+ apxLoadResourceA(IDS_ERRORCMD, 0),
lpCmdLine);
goto cleanup;
}
@@ -1640,8 +1645,8 @@
if ((mutex == NULL) || (GetLastError() == ERROR_ALREADY_EXISTS)) {
/* Skip sytem error message */
SetLastError(ERROR_SUCCESS);
- apxDisplayError(TRUE, NULL, 0, apxLoadResourceA(IDS_ALREAY_RUNING, 0),
- lpCmdline->szApplication);
+ apxDisplayError(TRUE, NULL, 0, apxLoadResourceA(IDS_ALREAY_RUNING, 0),
+ lpCmdline->szApplication);
goto cleanup;
}
}
@@ -1685,8 +1690,8 @@
DestroyIcon(hIcoRun);
if (mutex)
CloseHandle(mutex);
- if (lpCmdline)
- apxCmdlineFree(lpCmdline);
+ if (lpCmdline)
+ apxCmdlineFree(lpCmdline);
apxCloseHandle(hService);
apxHandleManagerDestroy();
ExitProcess(0);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]