Pass empty stopset to read_string so it can determine appropriate stopset for async data

pull/875/head
Mike Black W9MDB 2021-10-30 08:22:55 -05:00
rodzic 44871f7e9b
commit 84fb123202
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -676,7 +676,10 @@ int HAMLIB_API serial_flush(hamlib_port_t *p)
p->timeout = 1;
do
{
len = read_string(p, (char*)buf, sizeof(buf)-1, NULL, 0);
// we pass an empty stopset so read_string can determine
// the appropriate stopset for async data
char stopset[1];
len = read_string(p, (char*)buf, sizeof(buf)-1, stopset, 0);
if (len > 0)
{
int i, binary=0;