Add debug to read_string

pull/224/head
mdblack98 2020-04-22 09:53:37 -05:00
rodzic ee562ddd03
commit ded8b6873d
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -669,11 +669,13 @@ int HAMLIB_API read_string(hamlib_port_t *p,
if (!p || !rxbuffer) if (!p || !rxbuffer)
{ {
rig_debug(RIG_DEBUG_ERR,"%s: error p=%p, rxbuffer=%p\n", __func__, p, rxbuffer);
return -RIG_EINVAL; return -RIG_EINVAL;
} }
if (rxmax < 1) if (rxmax < 1)
{ {
rig_debug(RIG_DEBUG_ERR,"%s: error rxmax=%ld\n", __func__, rxmax);
return 0; return 0;
} }
@ -772,7 +774,7 @@ int HAMLIB_API read_string(hamlib_port_t *p,
/* /*
* Doesn't hurt anyway. But be aware, some binary protocols may have * Doesn't hurt anyway. But be aware, some binary protocols may have
* null chars within th received buffer. * null chars within the received buffer.
*/ */
rxbuffer[total_count] = '\000'; rxbuffer[total_count] = '\000';