From 012e33aea1c014b972ec2369929ef6649de462df Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Sun, 5 Feb 2023 23:43:53 +0100 Subject: [PATCH] aqhome: fixed a bug. --- aqhome/serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aqhome/serial.c b/aqhome/serial.c index 2caa291..a09a873 100644 --- a/aqhome/serial.c +++ b/aqhome/serial.c @@ -156,7 +156,7 @@ int AQH_Serial_IsOpen(AQH_SERIAL *sr) { if (sr->fd<0) { DBG_ERROR(NULL, "Device not open"); - return GWEN_ERROR_NOT_OPEN; + return 0; } else { struct termios options; @@ -165,7 +165,7 @@ int AQH_Serial_IsOpen(AQH_SERIAL *sr) rv=tcgetattr(sr->fd, &options); if (rv<0) { DBG_ERROR(NULL, "Error on tcgetattr(%s): %s (%d)", sr->deviceName, strerror(errno), errno); - return GWEN_ERROR_IO; + return 0; } return 1; }