aqhome: Fixed a bug.
This commit is contained in:
@@ -137,11 +137,11 @@ int AQH_Serial_Recv(AQH_SERIAL *sr, uint8_t *buf, int len)
|
|||||||
DBG_INFO(NULL, "here (%d)", rv);
|
DBG_INFO(NULL, "here (%d)", rv);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
msgLen=buf[1]+1; /* add one byte for XOR checksum */
|
msgLen=buf[1];
|
||||||
buf+=2;
|
buf+=2; /* two bytes already read */
|
||||||
|
|
||||||
/* read message and XOR byte */
|
/* read message and XOR byte */
|
||||||
rv=_readForced(sr, buf, msgLen);
|
rv=_readForced(sr, buf, msgLen+1); /* add one byte for XOR checksum */
|
||||||
if (rv<0) {
|
if (rv<0) {
|
||||||
DBG_INFO(NULL, "here (%d)", rv);
|
DBG_INFO(NULL, "here (%d)", rv);
|
||||||
return rv;
|
return rv;
|
||||||
|
|||||||
Reference in New Issue
Block a user