From de4ca7a5e99e416bebe970c40dc2d181034d3476 Mon Sep 17 00:00:00 2001 From: zolliker Date: Tue, 3 Mar 2009 15:06:59 +0000 Subject: [PATCH] - bug fix --- ascon.c | 10 ++++++---- ascon.i | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ascon.c b/ascon.c index b64c914d..2f6a51c2 100644 --- a/ascon.c +++ b/ascon.c @@ -587,6 +587,11 @@ AsconStatus AsconTask(Ascon * a) } a->state = AsconReadStart; break; + case AsconReading: + if (result != 0) { + break; /* char received: try again, probably more characters pending */ + } + return AsconPending; case AsconReadDone: a->state = AsconIdle; a->responseValid = 1; @@ -609,10 +614,7 @@ AsconStatus AsconTask(Ascon * a) } return AsconFailure; default: - if (result) { - return AsconPending; - } - break; + return AsconPending; } } } diff --git a/ascon.i b/ascon.i index e8bdd0ef..7ee8b375 100644 --- a/ascon.i +++ b/ascon.i @@ -84,7 +84,7 @@ struct Ascon { * value should be 1 * 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 - * that no charater was read. + * that no character was read. * * * In most cases a custom handler may be a wrapper around AsconBaseHandler