Skip to content
Snippets Groups Projects
Commit ba6673d1 authored by deuce's avatar deuce
Browse files

Was select()ing STDOUT instead of STDIN :-)

parent b2452bfc
No related branches found
No related tags found
No related merge requests found
......@@ -2786,7 +2786,7 @@ tODResult ODComGetByte(tPortHandle hPort, char *pbtNext, BOOL bWait)
tv.tv_sec=0;
tv.tv_usec=0;
select_ret = select(2, &socket_set, NULL, NULL, bWait ? NULL : &tv);
select_ret = select(1, &socket_set, NULL, NULL, bWait ? NULL : &tv);
if (select_ret == -1)
return (kODRCGeneralFailure);
if (select_ret == 0)
......
......@@ -816,10 +816,10 @@ ODAPIDEF void ODCALL od_sleep(tODMilliSec Milliseconds)
tv.tv_usec=(Milliseconds%1000)*1000;
if(Milliseconds==0) {
tv.tv_usec=1000;
FD_SET(1,&in);
FD_SET(0,&in);
}
if(select(2,Milliseconds?NULL:&in,NULL,NULL,&tv)>0)
if(select(1,Milliseconds?NULL:&in,NULL,NULL,&tv)>0)
od_kernel();
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment