Only return AsconTimeout in the aqadapter if no characters have been read.

Otherwise the DevQueueTask will skip fetching the reply.
This commit is contained in:
Ferdi Franceschini
2014-03-21 10:56:13 +11:00
committed by Ferdi Franceschini
parent e2f2f1bc0c
commit a785c5ceac

View File

@@ -191,7 +191,11 @@ static int scaqaProtHandler(Ascon *a)
return 0;
}
if (pp->txn.transWait < 0) {
a->state = AsconTimeout;
if (GetDynStringLength(a->rdBuffer) == 0) {
a->state = AsconTimeout;
} else {
a->state = AsconReadDone;
}
} else if (pp->txn.transWait == 0) {
a->state = AsconReadDone;
}