- do not swallow bytes in buffer before sending an empty line (binprot.c)
- state after EaseStop changed to offline instead of notconnected
This commit is contained in:
@ -357,7 +357,12 @@ int BinHandler(Ascon *a) {
|
||||
} while (res == 1);
|
||||
p->nextFmt = str + pos;
|
||||
a->wrPos = 0;
|
||||
if (GetDynStringLength(a->wrBuffer) == 0) {
|
||||
/* prevent to swallow "garbage" */
|
||||
a->state = AsconWriteDone;
|
||||
} else {
|
||||
a->state = AsconWriting;
|
||||
}
|
||||
a->lineCount = 0;
|
||||
return 1;
|
||||
case AsconReadStart:
|
||||
|
4
ease.c
4
ease.c
@ -61,7 +61,7 @@ void EaseStop(EaseBase * eab, char *reason)
|
||||
snprintf(eab->msg, sizeof eab->msg, "offline (%s)", reason);
|
||||
ParPrintf(eab, eLogError, "ERROR: %s", eab->msg);
|
||||
}
|
||||
eab->state = EASE_notconnected;
|
||||
eab->state = EASE_offline;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
@ -754,7 +754,7 @@ static int EaseInit(SConnection * pCon, EaseBase * eab, int argc,
|
||||
<host> <port>
|
||||
<host>:<port>
|
||||
*/
|
||||
int port=0, iRet, i;
|
||||
int port, iRet, i;
|
||||
rs232 *ser;
|
||||
char *colon, *host;
|
||||
char buf[64];
|
||||
|
Reference in New Issue
Block a user