From 7f28c22f6a93b619087f69810433844db5085b9c Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Mon, 4 May 2026 10:25:29 +0200 Subject: [PATCH] improved error handling on msg desync on TTY connections. just directly flush on error and return to normal operations immediately. --- aqhome/ipc2/msgreader.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/aqhome/ipc2/msgreader.c b/aqhome/ipc2/msgreader.c index 9fe903c..b8f8f84 100644 --- a/aqhome/ipc2/msgreader.c +++ b/aqhome/ipc2/msgreader.c @@ -248,11 +248,19 @@ void AQH_MsgReader_StartSkipping(AQH_OBJECT *o) xo=GWEN_INHERIT_GETDATA(AQH_OBJECT, AQH_MSG_READER, o); if (xo) { + int rv; + DBG_ERROR(AQH_LOGDOMAIN, "Enter skip mode"); GWEN_RingBuffer_Reset(xo->ringBuffer); _resetBuffers(xo); - xo->flags|=AQH_MSGREADER_FLAGS_SKIP; - xo->timestamp=_getTimeInMilliSeconds(); + + rv=AQH_FdObject_FlushInput(xo->fdObject); + if (rv<0) { + AQH_Object_EmitSignal(o, AQH_MSG_READER_SIGNAL_ERROR, rv, NULL); + } + + //xo->flags|=AQH_MSGREADER_FLAGS_SKIP; + //xo->timestamp=_getTimeInMilliSeconds(); } }