- changed select to uselect
- some fixes in tecs.c
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "coc_util.h"
|
||||
#include "myc_str.h"
|
||||
#include "myc_mem.h"
|
||||
#include "uselect.h"
|
||||
|
||||
#define ASYNSRV_TYPE 1
|
||||
#define TERMSRV_TYPE 2
|
||||
@@ -50,9 +51,11 @@ int SerWait(int tmo_msec, int fd) {
|
||||
|
||||
FD_ZERO(&mask);
|
||||
FD_SET(fd, &mask);
|
||||
|
||||
tmo.tv_sec=tmo_msec / 1000;
|
||||
tmo.tv_usec=(tmo_msec % 1000) % 1000 +1;
|
||||
ERR_SI(i=select(fd+1,&mask,NULL,NULL,&tmo));
|
||||
ERR_SI(i=uselect(fd+1,&mask,NULL,NULL,&tmo));
|
||||
|
||||
if (i==0) return(0); /* timeout */
|
||||
return(1);
|
||||
OnError: return(-1);
|
||||
|
||||
Reference in New Issue
Block a user