allow retry on overflow, communication error, and unknown cmd

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2932 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.11
Stéphane Fillod, F8CFE 2010-05-31 08:38:29 +00:00
rodzic 1fd0d38ea2
commit b588058b2d
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -231,16 +231,22 @@ transaction_write:
case 'O':
/* Too many characters sent without a carriage return */
rig_debug(RIG_DEBUG_VERBOSE, "%s: Overflow for '%s'\n", __func__, cmdstr);
if (retry_read++ < rig->state.rigport.retry)
goto transaction_write;
retval = -RIG_EPROTO;
goto transaction_quit;
case 'E':
/* Communication error */
rig_debug(RIG_DEBUG_VERBOSE, "%s: Communication error for '%s'\n", __func__, cmdstr);
if (retry_read++ < rig->state.rigport.retry)
goto transaction_write;
retval = -RIG_EIO;
goto transaction_quit;
case '?':
/* Command not understood by rig */
rig_debug(RIG_DEBUG_ERR, "%s: Unknown command '%s'\n", __func__, cmdstr);
if (retry_read++ < rig->state.rigport.retry)
goto transaction_write;
retval = -RIG_ERJCTED;
goto transaction_quit;
}