Index: src/SerialImp.c =================================================================== RCS file: /usr/local/cvsroot/rxtx-devel/src/SerialImp.c,v retrieving revision 1.46.2.187 diff -u -r1.46.2.187 SerialImp.c --- src/SerialImp.c 29 Jan 2006 22:19:04 -0000 1.46.2.187 +++ src/SerialImp.c 17 Mar 2006 12:52:31 -0000 @@ -3934,14 +3934,7 @@ if(!eis->eventflags[SPE_DATA_AVAILABLE] ) { report_verbose("report_serial_events: ignoring DATA_AVAILABLE\n"); -/* - report("."); -*/ - usleep(20000); -#if !defined(__sun__) - /* FIXME: No time to test on all OS's for production */ - usleep(20000); -#endif /* !__sun__ */ + usleep(5000); return; } report("report_serial_events: sending DATA_AVAILABLE\n"); @@ -3953,7 +3946,7 @@ #if !defined(__sun__) #endif /* !__sun__ */ } - usleep(20000); + usleep(5000); } } @@ -4111,16 +4104,12 @@ usleep(5000); */ eis.ret=1; - while( i++ < 5 ) + if(eis.eventflags[SPE_DATA_AVAILABLE] ) { - if(eis.eventflags[SPE_DATA_AVAILABLE] ) + if( port_has_changed_fionread( &eis ) ) { - if( port_has_changed_fionread( &eis ) ) - { - send_event( &eis, SPE_DATA_AVAILABLE, 1 ); - } + send_event( &eis, SPE_DATA_AVAILABLE, 1 ); } - usleep(1000); } i = 0; #endif /* WIN32 */