Bug fix: since the input thread does not wait for the event object
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 26 Aug 2006 08:15:53 +0000 (08:15 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 26 Aug 2006 08:15:53 +0000 (08:15 +0000)
until _after_ its first read, we should not start by signalling that
object in order to trigger the first read. Ahem.

git-svn-id: svn://svn.tartarus.org/sgt/putty@6799 cda61777-01e9-0310-a592-d414129be87e

windows/winhandl.c

index d220e64..c7dc65b 100644 (file)
@@ -273,7 +273,6 @@ struct handle *handle_input_new(HANDLE handle, handle_inputfn_t gotdata,
     h->u.i.ev_to_main = CreateEvent(NULL, FALSE, FALSE, NULL);
     h->u.i.ev_from_main = CreateEvent(NULL, FALSE, FALSE, NULL);
     h->u.i.gotdata = gotdata;
-    h->u.i.busy = FALSE;
     h->u.i.defunct = FALSE;
     h->u.i.moribund = FALSE;
     h->u.i.done = FALSE;
@@ -285,8 +284,7 @@ struct handle *handle_input_new(HANDLE handle, handle_inputfn_t gotdata,
 
     CreateThread(NULL, 0, handle_input_threadfunc,
                 &h->u.i, 0, NULL);
-
-    handle_throttle(&h->u.i, 0);       /* start first read operation */
+    h->u.i.busy = TRUE;
 
     return h;
 }