aqhome: fixed a bug.
This commit is contained in:
@@ -156,7 +156,7 @@ int AQH_Serial_IsOpen(AQH_SERIAL *sr)
|
|||||||
{
|
{
|
||||||
if (sr->fd<0) {
|
if (sr->fd<0) {
|
||||||
DBG_ERROR(NULL, "Device not open");
|
DBG_ERROR(NULL, "Device not open");
|
||||||
return GWEN_ERROR_NOT_OPEN;
|
return 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
struct termios options;
|
struct termios options;
|
||||||
@@ -165,7 +165,7 @@ int AQH_Serial_IsOpen(AQH_SERIAL *sr)
|
|||||||
rv=tcgetattr(sr->fd, &options);
|
rv=tcgetattr(sr->fd, &options);
|
||||||
if (rv<0) {
|
if (rv<0) {
|
||||||
DBG_ERROR(NULL, "Error on tcgetattr(%s): %s (%d)", sr->deviceName, strerror(errno), errno);
|
DBG_ERROR(NULL, "Error on tcgetattr(%s): %s (%d)", sr->deviceName, strerror(errno), errno);
|
||||||
return GWEN_ERROR_IO;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user