Add retries to flrig.c for set commands

Was getting some timeouts on these set commands
pull/518/head
Michael Black W9MDB 2021-01-16 12:32:18 -06:00
rodzic 1affac778b
commit 8595c244e4
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -517,6 +517,7 @@ static int write_transaction(RIG *rig, char *xml, int xml_len)
static int flrig_transaction(RIG *rig, char *cmd, char *cmd_arg, char *value,
int value_len)
{
char xml[MAXXMLLEN];
int retry = 2;
if (value)
@ -526,7 +527,6 @@ static int flrig_transaction(RIG *rig, char *cmd, char *cmd_arg, char *value,
do
{
char xml[MAXXMLLEN];
char *pxml;
int retval;
@ -551,7 +551,7 @@ static int flrig_transaction(RIG *rig, char *cmd, char *cmd_arg, char *value,
xml_parse(xml, value, value_len);
}
}
while (value && strlen(value) == 0 && retry--); // we'll do retries if needed
while (((value && strlen(value) == 0) || (strlen(xml)==0)) && retry--); // we'll do retries if needed
if (value && strlen(value) == 0) { return RIG_EPROTO; }

Wyświetl plik

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