]> git.droids-corp.org - protos/xbee-avr.git/commitdiff
fix parsing of xmit status in sendmsg command
authorOlivier Matz <zer0@droids-corp.org>
Tue, 6 May 2014 19:07:36 +0000 (21:07 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Tue, 6 May 2014 19:12:31 +0000 (21:12 +0200)
commands.c

index ddce65ff86df85165f772cbd0a8e38710f3fec37..ff8954ded9272c5cd00a552f933cbeb05446250e 100644 (file)
@@ -133,7 +133,7 @@ static void range_cb(struct callout_mgr *cm,
 static int8_t send_msg_cb(int8_t retcode, void *frame, unsigned len,
        void *arg)
 {
-       struct xbee_recv_hdr *recvframe = frame;
+       struct xbee_xmit_status_hdr *recvframe = frame;
        uint8_t *done = arg;
 
        *done = 1;
@@ -142,7 +142,7 @@ static int8_t send_msg_cb(int8_t retcode, void *frame, unsigned len,
                return retcode;
        }
        if (retcode == XBEE_USER_RETCODE_BAD_FRAME ||
-               len  sizeof(*recvframe)) {
+               len != sizeof(*recvframe)) {
                printf_P(PSTR("invalid frame\r\n"));
                return XBEE_USER_RETCODE_BAD_FRAME;
        }