SICS-593: Return 0 from the AsconReading state to ensure that SICS
progresses through tasks.
This commit is contained in:
@@ -353,7 +353,7 @@ int Protek608Reading(Ascon *a)
|
||||
snprintf(errMsg, ERRLEN, "PROTEK608: Unexpected value %X for last byte:", chr);
|
||||
AsconError(a, errMsg, 0);
|
||||
}
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
transByteStatus = translateByte(a->private, chr, (a->readState)++, field);
|
||||
if (transByteStatus == 1) {
|
||||
@@ -392,22 +392,22 @@ int Protek608Reading(Ascon *a)
|
||||
|
||||
if (ret < 0) {
|
||||
AsconError(a, "PROTEK608: AsconReadChar failed:", errno);
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
if (DS_AllocFailed || transByteFailed) {
|
||||
a->state = AsconReadDone;
|
||||
a->readState = 0;
|
||||
data->first = 1;
|
||||
AsconError(a, errMsg, errNum);
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
if (a->timeout > 0) {
|
||||
if (DoubleTime() - a->start > a->timeout) {
|
||||
AsconError(a, "PROTEK608: read timeout", 0);
|
||||
a->state = AsconTimeout;
|
||||
/* a->state = AsconTimeout; */
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user