kopia lustrzana https://github.com/Hamlib/Hamlib
Add line# to a couple of debug statements in iofunc.c to distinguish them
https://github.com/Hamlib/Hamlib/issues/695pull/1297/head
rodzic
01a7eee18d
commit
1ad664be4c
|
@ -498,6 +498,7 @@ static int port_read_sync_data(hamlib_port_t *p, void *buf, size_t count)
|
||||||
|
|
||||||
case ERROR_IO_PENDING:
|
case ERROR_IO_PENDING:
|
||||||
HAMLIB_TRACE;
|
HAMLIB_TRACE;
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: ERROR_IO_PENDING: timeout=%d\n", __func__, p->timeout);
|
||||||
timeout.QuadPart = (p->timeout * -1000000LL);
|
timeout.QuadPart = (p->timeout * -1000000LL);
|
||||||
|
|
||||||
if ((result = SetWaitableTimer(hLocal, &timeout, 0, NULL, NULL, 0)) == 0)
|
if ((result = SetWaitableTimer(hLocal, &timeout, 0, NULL, NULL, 0)) == 0)
|
||||||
|
@ -1177,7 +1178,7 @@ static int read_block_generic(hamlib_port_t *p, unsigned char *rxbuffer,
|
||||||
if (timeout_retries > 0)
|
if (timeout_retries > 0)
|
||||||
{
|
{
|
||||||
timeout_retries--;
|
timeout_retries--;
|
||||||
rig_debug(RIG_DEBUG_CACHE, "%s: retrying read timeout %d/%d\n", __func__,
|
rig_debug(RIG_DEBUG_CACHE, "%s(%d): retrying read timeout %d/%d\n", __func__, __LINE__,
|
||||||
p->timeout_retry - timeout_retries, p->timeout_retry);
|
p->timeout_retry - timeout_retries, p->timeout_retry);
|
||||||
hl_usleep(10 * 1000);
|
hl_usleep(10 * 1000);
|
||||||
continue;
|
continue;
|
||||||
|
@ -1333,7 +1334,6 @@ static int read_string_generic(hamlib_port_t *p,
|
||||||
memset(rxbuffer, 0, rxmax);
|
memset(rxbuffer, 0, rxmax);
|
||||||
|
|
||||||
short timeout_retries = p->timeout_retry;
|
short timeout_retries = p->timeout_retry;
|
||||||
|
|
||||||
while (total_count < rxmax - 1) // allow 1 byte for end-of-string
|
while (total_count < rxmax - 1) // allow 1 byte for end-of-string
|
||||||
{
|
{
|
||||||
ssize_t rd_count = 0;
|
ssize_t rd_count = 0;
|
||||||
|
@ -1346,7 +1346,7 @@ static int read_string_generic(hamlib_port_t *p,
|
||||||
if (timeout_retries > 0)
|
if (timeout_retries > 0)
|
||||||
{
|
{
|
||||||
timeout_retries--;
|
timeout_retries--;
|
||||||
rig_debug(RIG_DEBUG_CACHE, "%s: retrying read timeout %d/%d\n", __func__,
|
rig_debug(RIG_DEBUG_CACHE, "%s(%d): retrying read timeout %d/%d\n", __func__, __LINE__,
|
||||||
p->timeout_retry - timeout_retries, p->timeout_retry);
|
p->timeout_retry - timeout_retries, p->timeout_retry);
|
||||||
hl_usleep(10 * 1000);
|
hl_usleep(10 * 1000);
|
||||||
continue;
|
continue;
|
||||||
|
|
Ładowanie…
Reference in New Issue