rpcrt4: Improve error handling in RPCRT4_io_thread and remove commented-out code.

oldstable
Rob Shearman 2008-01-08 12:26:31 +00:00 committed by Alexandre Julliard
parent d0f914befc
commit af4639f74a
1 changed files with 8 additions and 5 deletions

View File

@ -369,15 +369,18 @@ static DWORD CALLBACK RPCRT4_io_thread(LPVOID the_arg)
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);