* fhandler_serial.cc (fhandler_serial::raw_read): Always find number of bytes
ready to be read whether overlapped_armed or not.
This commit is contained in:
		| @@ -1,3 +1,8 @@ | ||||
| Wed Dec 20 00:57:10 2000  Christopher Faylor <cgf@cygnus.com> | ||||
|  | ||||
| 	* fhandler_serial.cc (fhandler_serial::raw_read): Always find number of | ||||
| 	bytes ready to be read whether overlapped_armed or not. | ||||
|  | ||||
| Tue Dec 19 21:39:00 2000  Corinna Vinschen <corinna@vinschen.de> | ||||
|  | ||||
| 	* syscalls.cc (remove): New function, overriding the newlib | ||||
|   | ||||
| @@ -1072,8 +1072,8 @@ events_terminate (void) | ||||
|  | ||||
| #define pid_offset (unsigned)(((_pinfo *)NULL)->pid) | ||||
| extern "C" { | ||||
| static void __stdcall reset_signal_arrived () __attribute__ ((unused)); | ||||
| static void __stdcall | ||||
| static void volatile __stdcall reset_signal_arrived () __attribute__ ((unused)); | ||||
| static void volatile __stdcall | ||||
| reset_signal_arrived () | ||||
| { | ||||
|   (void) ResetEvent (signal_arrived); | ||||
|   | ||||
| @@ -79,15 +79,16 @@ fhandler_serial::raw_read (void *ptr, size_t ulen) | ||||
| 			// if vmin > ulen then things won't work right. | ||||
| 	  overlapped_armed = -1; | ||||
| 	} | ||||
|       if (!overlapped_armed) | ||||
| 	{ | ||||
|  | ||||
|       if (!ClearCommError (get_handle (), &ev, &st)) | ||||
| 	goto err; | ||||
|       else if (ev) | ||||
| 	termios_printf ("error detected %x", ev); | ||||
|       else if (st.cbInQue) | ||||
| 	inq = st.cbInQue; | ||||
| 	  else if ((size_t)tot >= minchars) | ||||
|       else if (!overlapped_armed) | ||||
| 	{ | ||||
| 	  if ((size_t)tot >= minchars) | ||||
| 	    break; | ||||
| 	  else if (WaitCommEvent (get_handle (), &ev, &io_status)) | ||||
| 	    { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user