aqhome: fixed a bug.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user