Change sync_cb to encompass the entire transaction

Testing to see if the fixes the problem with Flex rigs
pull/224/head
Michael Black 2020-04-15 09:37:22 -05:00
rodzic 79871210eb
commit ba8f56dfbb
1 zmienionych plików z 9 dodań i 3 usunięć

Wyświetl plik

@ -1542,7 +1542,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
#endif // HAVE_LIBREADLINE
if (sync_cb) { sync_cb(1); } /* lock if necessary */
if (sync_cb) sync_cb(1); /* lock if necessary */
if (!prompt)
{
@ -1600,9 +1600,13 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
p2 ? p2 : "",
p3 ? p3 : "");
if (sync_cb) { sync_cb(0); } /* unlock if necessary */
if (retcode == RIG_EIO) { return retcode; }
if (retcode == RIG_EIO)
{
if (sync_cb) sync_cb(0); /* unlock if necessary */
return retcode;
}
if (retcode != RIG_OK)
{
@ -1645,6 +1649,8 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
fflush(fout);
if (sync_cb) sync_cb(0); /* unlock if necessary */
if (retcode == -RIG_ENAVAIL)
{
return retcode;