From: Michael Gernoth Date: Wed, 1 Jul 2015 17:44:17 +0000 (+0200) Subject: hmland: fix interpretation of '+' X-Git-Tag: v0.101~1 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/hmcfgusb/commitdiff_plain/6b663018bcc9b0c6a903d46ac2da6f1635fb61f4 hmland: fix interpretation of '+' The usb device expects a length byte before the AES channel-mask is sent, so add it in. This fixes non-working aesCommReq. --- diff --git a/hmland.c b/hmland.c index 73a08d4..f1f0e3d 100644 --- a/hmland.c +++ b/hmland.c @@ -440,6 +440,11 @@ static int hmlan_parse_one(uint8_t *cmd, int last, void *data) parse_part_in(&inpos, (last-(inpos-cmd)), &outpos, (sizeof(out)-(outpos-out)), 0); parse_part_in(&inpos, (last-(inpos-cmd)), &outpos, (sizeof(out)-(outpos-out)), FLAG_LENGTH_BYTE); break; + case '+': + parse_part_in(&inpos, (last-(inpos-cmd)), &outpos, (sizeof(out)-(outpos-out)), 0); + parse_part_in(&inpos, (last-(inpos-cmd)), &outpos, (sizeof(out)-(outpos-out)), 0); + parse_part_in(&inpos, (last-(inpos-cmd)), &outpos, (sizeof(out)-(outpos-out)), 0); + parse_part_in(&inpos, (last-(inpos-cmd)), &outpos, (sizeof(out)-(outpos-out)), FLAG_LENGTH_BYTE); default: parse_part_in(&inpos, (last-(inpos-cmd)), &outpos, (sizeof(out)-(outpos-out)), FLAG_IGNORE_COMMAS); break;