From 4c8d03d9bd49951050fab58c14d24e957b6c7495 Mon Sep 17 00:00:00 2001
From: davidely <davidely@localhost>
Date: Mon, 07 May 2007 22:08:58 +0000
Subject: [PATCH] This checkin includes a few changes, but the only real problem that I saw was here:
---
opendj-sdk/opends/src/build-tools/windows/winlauncher.c | 4 ++--
opendj-sdk/opends/lib/opends_service.exe | 0
opendj-sdk/opends/src/build-tools/windows/service.c | 15 +++++++++------
opendj-sdk/opends/lib/winlauncher.exe | 0
4 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/opendj-sdk/opends/lib/opends_service.exe b/opendj-sdk/opends/lib/opends_service.exe
index e825ff2..2a7b3a3 100755
--- a/opendj-sdk/opends/lib/opends_service.exe
+++ b/opendj-sdk/opends/lib/opends_service.exe
Binary files differ
diff --git a/opendj-sdk/opends/lib/winlauncher.exe b/opendj-sdk/opends/lib/winlauncher.exe
index cf70a07..52c87a1 100755
--- a/opendj-sdk/opends/lib/winlauncher.exe
+++ b/opendj-sdk/opends/lib/winlauncher.exe
Binary files differ
diff --git a/opendj-sdk/opends/src/build-tools/windows/service.c b/opendj-sdk/opends/src/build-tools/windows/service.c
index 6be0345..09c450a 100644
--- a/opendj-sdk/opends/src/build-tools/windows/service.c
+++ b/opendj-sdk/opends/src/build-tools/windows/service.c
@@ -545,8 +545,7 @@
{
returnValue = SERVICE_RETURN_ERROR;
- debug("doStartApplication: spawn failed. Sent command:");
- debug(command);
+ debug("doStartApplication: spawn failed. Sent command: '%s'", command);
}
}
else
@@ -609,8 +608,7 @@
else
{
returnValue = SERVICE_RETURN_ERROR;
- debug("doStopApplication: spawn failed. Sent command:");
- debug(command);
+ debug("doStopApplication: spawn failed. Sent command: %s", command);
}
}
else
@@ -1664,11 +1662,13 @@
// open the service
if (returnValue == SERVICE_RETURN_OK)
{
+ debug("About to open service '%s'.", serviceName);
myService = OpenService(
scm,
serviceName,
SERVICE_ALL_ACCESS | DELETE
);
+ debug("After opening service myService=%d.", myService);
if (myService == NULL)
{
debugError("Failed to open the service '%s'. Last error = %d", serviceName, GetLastError());
@@ -1678,7 +1678,9 @@
if (returnValue == SERVICE_RETURN_OK)
{
- BOOL success = QueryServiceStatus(
+ BOOL success;
+ debug("About to query the service '%s'.", serviceName);
+ success = QueryServiceStatus(
myService,
&serviceStatus
);
@@ -1692,6 +1694,7 @@
// stop the service if necessary
if (returnValue == SERVICE_RETURN_OK)
{
+ debug("Successfully queried the service '%s'.", serviceName);
if (serviceStatus.dwCurrentState != SERVICE_STOPPED)
{
BOOL success;
@@ -1725,7 +1728,7 @@
if (returnValue == SERVICE_RETURN_OK)
{
BOOL success;
- debug("Deleting the service '%s'.");
+ debug("Deleting the service '%s'.", serviceName);
success = DeleteService (myService);
if (!success)
{
diff --git a/opendj-sdk/opends/src/build-tools/windows/winlauncher.c b/opendj-sdk/opends/src/build-tools/windows/winlauncher.c
index bdcae20..2f446e7 100644
--- a/opendj-sdk/opends/src/build-tools/windows/winlauncher.c
+++ b/opendj-sdk/opends/src/build-tools/windows/winlauncher.c
@@ -42,7 +42,7 @@
if ((strlen(relativePath) + strlen(instanceDir)) < maxSize)
{
- sprintf(pidFile, maxSize, "%s\\logs\\server.pid", instanceDir);
+ sprintf(pidFile, "%s\\logs\\server.pid", instanceDir);
returnValue = TRUE;
debug("PID file name is '%s'.", pidFile);
}
@@ -573,7 +573,7 @@
else
{
char * msg = "Unknown subcommand: [%s]\n";
- debugError(msg, argc - 1);
+ debugError(msg, subcommand);
fprintf(stderr, msg, subcommand);
returnCode = -1;
}
--
Gitblit v1.10.0