kopia lustrzana https://github.com/Hamlib/Hamlib
Undo last commit to serial.c
rodzic
73d947213f
commit
49d24815b2
15
src/serial.c
15
src/serial.c
|
@ -677,22 +677,9 @@ int ser_open(hamlib_port_t *p)
|
|||
/*
|
||||
* pathname is not uh_rig or uh_ptt: simply open()
|
||||
*/
|
||||
int i;
|
||||
for(i=0, ret=-1;i<5 && ret < 0;++i)
|
||||
{
|
||||
ret = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
|
||||
if (ret < 0) {
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: OPEN attempt#%d failed %d=%s\n", __func__, i+1, ret, strerror(errno));
|
||||
hl_usleep(100*1000); // 100ms between attempts
|
||||
}
|
||||
}
|
||||
|
||||
ret = OPEN(p->pathname, O_RDWR | O_NOCTTY | O_NDELAY);
|
||||
}
|
||||
}
|
||||
if (ret == -1)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: OPEN failed %d=%s\n", __func__, ret, strerror(errno));
|
||||
}
|
||||
|
||||
p->fd = ret;
|
||||
return ret;
|
||||
|
|
Ładowanie…
Reference in New Issue