]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix Plink, the serial backend, and local-proxy support on Win98SE (at least),
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Sun, 21 Jan 2007 23:34:35 +0000 (23:34 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Sun, 21 Jan 2007 23:34:35 +0000 (23:34 +0000)
which have been broken since r6797.
(At least some versions of Win9x are gratuitously picky about the arguments to
CreateThread(), requiring lpThreadId not to be NULL.)

[originally from svn r7132]
[r6797 == 291533d3f9abb6f33ebe2a73f34420fc9f8e9433]

windows/winhandl.c

index b5f0b8599182658102c93dfe090b31eb33de511b..f515ee57b009d209fadc525374afe060d4cddedb 100644 (file)
@@ -332,6 +332,7 @@ struct handle *handle_input_new(HANDLE handle, handle_inputfn_t gotdata,
                                void *privdata, int flags)
 {
     struct handle *h = snew(struct handle);
+    DWORD in_threadid; /* required for Win9x */
 
     h->output = FALSE;
     h->u.i.h = handle;
@@ -349,7 +350,7 @@ struct handle *handle_input_new(HANDLE handle, handle_inputfn_t gotdata,
     add234(handles_by_evtomain, h);
 
     CreateThread(NULL, 0, handle_input_threadfunc,
-                &h->u.i, 0, NULL);
+                &h->u.i, 0, &in_threadid);
     h->u.i.busy = TRUE;
 
     return h;
@@ -359,6 +360,7 @@ struct handle *handle_output_new(HANDLE handle, handle_outputfn_t sentdata,
                                 void *privdata, int flags)
 {
     struct handle *h = snew(struct handle);
+    DWORD out_threadid; /* required for Win9x */
 
     h->output = TRUE;
     h->u.o.h = handle;
@@ -378,7 +380,7 @@ struct handle *handle_output_new(HANDLE handle, handle_outputfn_t sentdata,
     add234(handles_by_evtomain, h);
 
     CreateThread(NULL, 0, handle_output_threadfunc,
-                &h->u.i, 0, NULL);
+                &h->u.i, 0, &out_threadid);
 
     return h;
 }