Changed exit process for trx loop
pull/1/head
David Freese 2015-02-08 08:41:29 -06:00
rodzic 1155d8d0c7
commit 31e231beef
2 zmienionych plików z 3 dodań i 11 usunięć

Wyświetl plik

@ -3006,16 +3006,7 @@ bool clean_exit(bool ask) {
ADIF_RW_close();
if (trx_state == STATE_RX || trx_state == STATE_TX || trx_state == STATE_TUNE)
trx_state = STATE_ABORT;
else {
LOG_ERROR("trx in unexpected state %d", trx_state);
exit(1);
}
while (trx_state != STATE_ENDED) {
REQ_FLUSH(GET_THREAD_ID());
MilliSleep(10);
}
trx_close();
#if USE_HAMLIB
if (xcvr) delete xcvr;

Wyświetl plik

@ -680,7 +680,8 @@ void trx_start(void)
void trx_close()
{
trx_state = STATE_ABORT;
while (trx_state != STATE_ENDED)
int count = 10;
while (trx_state != STATE_ENDED && count--)
MilliSleep(100);
#if USE_NAMED_SEMAPHORES