From: Michael Gernoth Date: Sun, 23 Jun 2013 09:54:33 +0000 (+0200) Subject: fix cases where there are multiple commands per packet including sends X-Git-Tag: v0.100~79 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/hmcfgusb/commitdiff_plain/03ca736e9401a06e131df45c763715fbe8f9c2df?ds=inline fix cases where there are multiple commands per packet including sends this allows hland to be used as lan adapter with a CCU or the windows config software --- diff --git a/hmland.c b/hmland.c index f3353f6..eaf8521 100644 --- a/hmland.c +++ b/hmland.c @@ -298,7 +298,7 @@ static int hmlan_parse_in(int fd, void *data) memset(out, 0, sizeof(out)); *outpos++ = *inpos++; - switch(buf[0]) { + switch(*instart) { case 'S': parse_part_in(&inpos, (last-(inpos-instart)), &outpos, (sizeof(out)-(outpos-out)), 0); parse_part_in(&inpos, (last-(inpos-instart)), &outpos, (sizeof(out)-(outpos-out)), 0);