Author: cgutman
Date: Tue Aug 2 23:46:32 2011
New Revision: 53039
URL: http://svn.reactos.org/svn/reactos?rev=53039&view=rev
Log:
[IP]
- Correct the error number comments for lwIP 1.4.0
- Translate ERR_WOULDBLOCK
- Translate ERR_IF and ERR_CONN to a more accurate status
[LWIP]
- Remove another debug print
Modified:
branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c
branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/rostcp.c
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
==============================================================================
--- branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] (original)
+++ branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Tue Aug 2 23:46:32 2011
@@ -200,16 +200,17 @@
case ERR_BUF: Status = STATUS_BUFFER_TOO_SMALL; break; //-2
case ERR_TIMEOUT: Status = STATUS_TIMEOUT; break; // -3
case ERR_RTE: Status = STATUS_NETWORK_UNREACHABLE; break; //-4
- case ERR_ABRT: Status = STATUS_LOCAL_DISCONNECT; break; //-5
- case ERR_RST: Status = STATUS_REMOTE_DISCONNECT; break; //-6
- case ERR_CLSD: Status = STATUS_FILE_CLOSED; break; //-7
- case ERR_CONN: Status = STATUS_UNSUCCESSFUL; break; //-8 (FIXME)
- case ERR_VAL: Status = STATUS_INVALID_PARAMETER; break; //-9
- case ERR_ARG: Status = STATUS_INVALID_PARAMETER; break; //-10
- case ERR_USE: Status = STATUS_ADDRESS_ALREADY_EXISTS; break; //-11
- case ERR_IF: Status = STATUS_NETWORK_UNREACHABLE; break; //-12
- case ERR_ISCONN: Status = STATUS_UNSUCCESSFUL; break; //-13 (FIXME)
- case ERR_INPROGRESS: Status = STATUS_PENDING; return Status; //-14
+ case ERR_INPROGRESS: Status = STATUS_PENDING; return Status; //-5
+ case ERR_VAL: Status = STATUS_INVALID_PARAMETER; break; //-6
+ case ERR_WOULDBLOCK: Status = STATUS_CANT_WAIT; break; //-7
+ case ERR_USE: Status = STATUS_ADDRESS_ALREADY_EXISTS; break; //-8
+ case ERR_ISCONN: Status = STATUS_UNSUCCESSFUL; break; //-9 (FIXME)
+ case ERR_ABRT: Status = STATUS_LOCAL_DISCONNECT; break; //-10
+ case ERR_RST: Status = STATUS_REMOTE_DISCONNECT; break; //-11
+ case ERR_CLSD: Status = STATUS_FILE_CLOSED; break; //-12
+ case ERR_CONN: Status = STATUS_INVALID_CONNECTION; break; //-13
+ case ERR_ARG: Status = STATUS_INVALID_PARAMETER; break; //-14
+ case ERR_IF: Status = STATUS_UNEXPECTED_NETWORK_ERROR; break; //-15
default:
DbgPrint("Invalid error value: %d\n", err);
ASSERT(FALSE);
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/rostcp.c
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
==============================================================================
--- branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/rostcp.c [iso-8859-1] (original)
+++ branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/rostcp.c [iso-8859-1] Tue Aug 2 23:46:32 2011
@@ -236,9 +236,6 @@
void
InternalErrorEventHandler(void *arg, const err_t err)
{
- DbgPrint("[lwIP, InternalErrorEventHandler] ErrorEvent(0x%x, %d)\n",
- arg, (unsigned int)err);
-
/* Make sure the socket didn't get closed */
if (!arg) return;
Author: ekohl
Date: Tue Aug 2 20:37:48 2011
New Revision: 53036
URL: http://svn.reactos.org/svn/reactos?rev=53036&view=rev
Log:
[SERVICES]
- If a service will be started and another service is already running in the same image, send a start command instead of starting the process again.
This enables us to run multiple services within a single process, like svchost.exe.
Modified:
trunk/reactos/base/system/services/database.c
Modified: trunk/reactos/base/system/services/database.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/datab…
==============================================================================
--- trunk/reactos/base/system/services/database.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/services/database.c [iso-8859-1] Tue Aug 2 20:37:48 2011
@@ -217,6 +217,8 @@
/* Increment the run counter */
pServiceImage->dwImageRunCount++;
}
+
+ DPRINT("pServiceImage->dwImageRunCount: %lu\n", pServiceImage->dwImageRunCount);
/* Link the service image to the service */
pService->lpImage = pServiceImage;
@@ -1080,6 +1082,13 @@
DWORD dwProcessId;
DPRINT("ScmStartUserModeService(%p)\n", Service);
+
+ /* If the image is already running ... */
+ if (Service->lpImage->dwImageRunCount > 1)
+ {
+ /* ... just send a start command */
+ return ScmSendStartCommand(Service, argc, argv);
+ }
StartupInfo.cb = sizeof(StartupInfo);
StartupInfo.lpReserved = NULL;