From 6b663018bcc9b0c6a903d46ac2da6f1635fb61f4 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Wed, 1 Jul 2015 19:44:17 +0200 Subject: [PATCH] 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. --- hmland.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.5