]> git.zerfleddert.de Git - hmcfgusb/commitdiff
hmland: fix interpretation of '+'
authorMichael Gernoth <michael@gernoth.net>
Wed, 1 Jul 2015 17:44:17 +0000 (19:44 +0200)
committerMichael Gernoth <michael@gernoth.net>
Wed, 1 Jul 2015 17:44:17 +0000 (19:44 +0200)
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

index 73a08d40766e745b838d5c77f89b28c2a9734d87..f1f0e3dcf88595ca9b310057539e1eb5638f2d38 100644 (file)
--- 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;
Impressum, Datenschutz