kopia lustrzana https://github.com/Hamlib/Hamlib
Add some debug for flush
rodzic
5d16de90ee
commit
fab30e07c1
|
@ -568,11 +568,14 @@ int HAMLIB_API serial_flush(hamlib_port_t *p)
|
||||||
* if fd corresponds to a microHam device drain the line
|
* if fd corresponds to a microHam device drain the line
|
||||||
* (which is a socket) by reading until it is empty.
|
* (which is a socket) by reading until it is empty.
|
||||||
*/
|
*/
|
||||||
while (read(p->fd, buf, 32) > 0) {
|
int n;
|
||||||
|
while ((n=read(p->fd, buf, 32)) > 0) {
|
||||||
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: flushed %d bytes\n", __func__, n);
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
}
|
}
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
}
|
}
|
||||||
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: tcflush\n", __func__);
|
||||||
tcflush(p->fd, TCIFLUSH);
|
tcflush(p->fd, TCIFLUSH);
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue