pull/224/head
Michael Black 2020-04-21 08:40:57 -05:00
commit 343835c94c
3 zmienionych plików z 14 dodań i 4 usunięć

Wyświetl plik

@ -409,14 +409,15 @@ static int read_transaction(RIG *rig, char *xml, int xml_len)
char tmp_buf[MAXXMLLEN]; // plenty big for expected flrig responses hopefully
int len = read_string(&rs->rigport, tmp_buf, sizeof(tmp_buf), delims,
strlen(delims));
rig_debug(RIG_DEBUG_TRACE, "%s: string='%s'", __func__, tmp_buf);
rig_debug(RIG_DEBUG_TRACE, "%s: string='%s'\n", __func__, tmp_buf);
if (len > 0) { retry = 3; }
if (len <= 0)
{
rig_debug(RIG_DEBUG_ERR, "%s: read_string error=%d\n", __func__, len);
return -(100 + RIG_EPROTO);
//return -(100 + RIG_EPROTO);
continue;
}
if (strlen(xml) + strlen(tmp_buf) < xml_len - 1)
@ -436,6 +437,7 @@ static int read_transaction(RIG *rig, char *xml, int xml_len)
if (retry == 0)
{
rig_debug(RIG_DEBUG_WARN, "%s: retry timeout\n", __func__);
return -RIG_ETIMEOUT;
}
if (strstr(xml, terminator))
@ -1464,7 +1466,9 @@ static int flrig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
return retval;
}
read_transaction(rig, xml, sizeof(xml));
retval = read_transaction(rig, xml, sizeof(xml));
if (retval < 0) {
}
xml_parse(xml, value, sizeof(value));
retval = modeMapGetHamlib(value);

Wyświetl plik

@ -28,7 +28,7 @@
#include <sys/time.h>
#endif
#define BACKEND_VER "20200319"
#define BACKEND_VER "20200421"
#define EOM "\r"
#define TRUE 1

Wyświetl plik

@ -1023,14 +1023,20 @@ void *handle_socket(void *arg)
sync_callback,
1, 0, handle_data_arg->vfo_mode, send_cmd_term, &ext_resp, &resp_sep);
if (retcode != 0) rig_debug(RIG_DEBUG_ERR, "%s: rigctl_parse retcode=%d\n", __func__, retcode);
if (ferror(fsockin) || ferror(fsockout))
{
rig_debug(RIG_DEBUG_ERR,"%s: %d, %d\n", __func__, ferror(fsockin), ferror(fsockout));
retcode = 1;
}
if (retcode == 1)
{
retcode = rig_close(my_rig);
rig_debug(RIG_DEBUG_ERR,"%s: rig_close retcode=%d\n", __func__, retcode);
retcode = rig_open(my_rig);
rig_debug(RIG_DEBUG_ERR,"%s: rig_open retcode=%d\n", __func__, retcode);
}
}
while (retcode == 0 || retcode == 2 || retcode == -RIG_ENAVAIL);