On Thursday 17 April 2003 09:36 pm, Ove Kaaven wrote:
> diff -u -r1.12 rpc_server.c
> --- dlls/rpcrt4/rpc_server.c 18 Apr 2003 02:04:17 -0000 1.12
> +++ dlls/rpcrt4/rpc_server.c 18 Apr 2003 02:16:51 -0000
> @@ -285,11 +286,18 @@
>
> static void RPCRT4_new_client(RpcConnection* conn)
> {
> - conn->thread = CreateThread(NULL, 0, RPCRT4_io_thread, conn, 0, NULL);
> - if (!conn->thread) {
> + HANDLE thread = CreateThread(NULL, 0, RPCRT4_io_thread, conn, 0, NULL);
> + if (!thread) {
> DWORD err = GetLastError();
> ERR("failed to create thread, error=%08lx\n", err);
> + RPCRT4_DestroyConnection(conn);
> }
> + /* we could set conn->thread, but then we'd have to make the io_thread wait
> + * for that, otherwise the thread might finish, destroy the connection, and
> + * free the memory we'd write to before we did, causing crashes and stuff -
> + * so let's implement that later, when we really need conn->thread */
> +
> + CloseHandle( thread );
> }
>
> static DWORD CALLBACK RPCRT4_server_thread(LPVOID the_arg)
great, I don't understand this underlying pipe issue yet,
but somehow, I'm betting this was just what the doctor ordered to
get RPC back in on its feet ...
thanks!
btw, if you have kludgy patches that you would like to get back to wine,
I reccomend you post them to wine-devel, which differentiates "not ready"
from "ready" patches (that's just how I do it -- for all I know,
this might contradict some official guideline).
--
gmt
"Democracy is the theory that holds that the common people know
what they want, and deserve to get it good and hard." HL Mencken