Author: cwittich
Date: Fri Jan 18 13:09:21 2008
New Revision: 31850
URL:
http://svn.reactos.org/svn/reactos?rev=31850&view=rev
Log:
Rob Shearman : rpcrt4: Improve error handling in RPCRT4_io_thread and remove commented-out
code. <rob at codeweavers.com>
Modified:
trunk/reactos/dll/win32/rpcrt4/rpc_server.c
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_server.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_serve…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/rpc_server.c (original)
+++ trunk/reactos/dll/win32/rpcrt4/rpc_server.c Fri Jan 18 13:09:21 2008
@@ -374,15 +374,17 @@
break;
}
-#if 0
- RPCRT4_process_packet(conn, hdr, msg);
-#else
packet = HeapAlloc(GetProcessHeap(), 0, sizeof(RpcPacket));
+ if (!packet)
+ break;
packet->conn = conn;
packet->hdr = hdr;
packet->msg = msg;
- QueueUserWorkItem(RPCRT4_worker_thread, packet, WT_EXECUTELONGFUNCTION);
-#endif
+ if (!QueueUserWorkItem(RPCRT4_worker_thread, packet, WT_EXECUTELONGFUNCTION)) {
+ ERR("couldn't queue work item for worker thread, error was %d\n",
GetLastError());
+ HeapFree(GetProcessHeap(), 0, packet);
+ break;
+ }
msg = NULL;
}
RPCRT4_DestroyConnection(conn);