DCOM: Comments
Robert Shearman
rob at codeweavers.com
Wed Jul 28 05:08:14 CDT 2004
Mike Hearn <mh at codeweavers.com>
Robert Shearman <rob at codeweavers.com>
Changelog:
Add a comment on the SendReceive behaviour. Improve two others.
-------------- next part --------------
Index: wine/dlls/ole32/rpc.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/rpc.c,v
retrieving revision 1.19
diff -u -r1.19 rpc.c
--- wine/dlls/ole32/rpc.c 23 Jul 2004 22:58:13 -0000 1.19
+++ wine/dlls/ole32/rpc.c 28 Jul 2004 10:02:52 -0000
@@ -85,10 +85,11 @@
static wine_rpc_request **reqs = NULL;
static int nrofreqs = 0;
-/* This pipe is _thread_ based */
+/* This pipe is _thread_ based, each thread which talks to a remote
+ * apartment (mid) has its own pipe */
typedef struct _wine_pipe {
wine_marshal_id mid; /* target mid */
- DWORD tid; /* thread in which we execute */
+ DWORD tid; /* thread which owns this outgoing pipe */
HANDLE hPipe;
int pending;
@@ -298,7 +299,7 @@
) {
/*ICOM_THIS(PipeBuf,iface);*/
- TRACE("(%p,%s), slightly wrong.\n",msg,debugstr_guid(riid));
+ TRACE("(%p,%s)\n",msg,debugstr_guid(riid));
/* probably reuses IID in real. */
if (msg->cbBuffer && (msg->Buffer == NULL))
msg->Buffer = HeapAlloc(GetProcessHeap(),0,msg->cbBuffer);
@@ -366,8 +367,9 @@
hres = _xwrite(req->hPipe,req->Buffer,req->reqh.cbBuffer);
if (hres) return hres;
+ /* This loop is about allowing re-entrancy. While waiting for the
+ * response to one RPC we may receive a request starting another. */
while (1) {
- /*WaitForSingleObject(hRpcChanged,INFINITE);*/
hres = _read_one(xpipe);
if (hres) break;
More information about the wine-patches
mailing list