Make write_block fail when device is not open

https://github.com/Hamlib/Hamlib/issues/912
pull/913/head
Mike Black W9MDB 2021-12-30 06:59:26 -06:00
rodzic 80188965a1
commit 8a78069975
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -570,6 +570,11 @@ int HAMLIB_API write_block(hamlib_port_t *p, const unsigned char *txbuffer, size
{
int ret;
if (p->fd < 0)
{
rig_debug(RIG_DEBUG_ERR, "%s: port not open\n", __func__);
RETURNFUNC(-RIG_EIO);
}
#ifdef WANT_NON_ACTIVE_POST_WRITE_DELAY
if (p->post_write_date.tv_sec != 0)