kopia lustrzana https://github.com/Hamlib/Hamlib
Future code information in iofunc.c
rodzic
8c274456d4
commit
b63460f05f
10
src/iofunc.c
10
src/iofunc.c
|
@ -1339,10 +1339,14 @@ static int read_string_generic(hamlib_port_t *p,
|
||||||
*/
|
*/
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
// The ioctl works on Linux but not mingw -- enable in 4.6 for non-mingw builds and see if it breaks anything
|
#if 0
|
||||||
//int avail=0;
|
#ifndef __MINGW32__
|
||||||
//ioctl(p->fd, FIONREAD, &avail);
|
// The ioctl works on Linux but not mingw
|
||||||
|
int avail=0;
|
||||||
|
ioctl(p->fd, FIONREAD, &avail);
|
||||||
//rig_debug(RIG_DEBUG_ERR, "xs: avail=%d expected_len=%d, minlen=%d, direct=%d\n", __func__, avail, expected_len, minlen, direct);
|
//rig_debug(RIG_DEBUG_ERR, "xs: avail=%d expected_len=%d, minlen=%d, direct=%d\n", __func__, avail, expected_len, minlen, direct);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
rd_count = port_read_generic(p, &rxbuffer[total_count],
|
rd_count = port_read_generic(p, &rxbuffer[total_count],
|
||||||
expected_len == 1 ? 1 : minlen, direct);
|
expected_len == 1 ? 1 : minlen, direct);
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: read %d bytes\n", __func__, (int)rd_count);
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: read %d bytes\n", __func__, (int)rd_count);
|
||||||
|
|
Ładowanie…
Reference in New Issue