- bug fix

This commit is contained in:
zolliker
2009-03-03 15:06:59 +00:00
parent 944fc9dfd5
commit de4ca7a5e9
2 changed files with 7 additions and 5 deletions

10
ascon.c
View File

@ -587,6 +587,11 @@ AsconStatus AsconTask(Ascon * a)
} }
a->state = AsconReadStart; a->state = AsconReadStart;
break; break;
case AsconReading:
if (result != 0) {
break; /* char received: try again, probably more characters pending */
}
return AsconPending;
case AsconReadDone: case AsconReadDone:
a->state = AsconIdle; a->state = AsconIdle;
a->responseValid = 1; a->responseValid = 1;
@ -609,10 +614,7 @@ AsconStatus AsconTask(Ascon * a)
} }
return AsconFailure; return AsconFailure;
default: default:
if (result) { return AsconPending;
return AsconPending;
}
break;
} }
} }
} }

View File

@ -84,7 +84,7 @@ struct Ascon {
* value should be 1 * value should be 1
* when the state was AsconReading, a 1 indicates that a character was read * when the state was AsconReading, a 1 indicates that a character was read
* and the character is stored in the lastChar field. A 0 indicates * and the character is stored in the lastChar field. A 0 indicates
* that no charater was read. * that no character was read.
* *
* *
* In most cases a custom handler may be a wrapper around AsconBaseHandler * In most cases a custom handler may be a wrapper around AsconBaseHandler