X-Git-Url: http://git.droids-corp.org/?p=protos%2Fxbee-avr.git;a=blobdiff_plain;f=xbee_proto.c;h=409d9a95aed82568b81291c54e2a2bfdb4ec11f2;hp=05f0b564d64ea7d7c25a5955efb7142e7a0f6de7;hb=f74db5fd03bcd38af3ca533e7531dd70454dfaaf;hpb=decf72af3888e8412fb0c7ccab71607682eb5973 diff --git a/xbee_proto.c b/xbee_proto.c index 05f0b56..409d9a9 100644 --- a/xbee_proto.c +++ b/xbee_proto.c @@ -230,7 +230,7 @@ int xbee_proto_xmit(struct xbee_dev *dev, uint8_t channel_id, uint8_t type, hdr.type = type; hdr.id = channel_id; - if (channel_id < 0 || channel_id >= XBEE_MAX_CHANNEL || + if (channel_id >= XBEE_MAX_CHANNEL || dev->channel[channel_id].registered == 0) { dev->stats.tx_invalid_channel ++; return -1; @@ -327,8 +327,9 @@ void xbee_proto_rx(struct xbee_dev *dev) /* not enough data */ if (dev->frame_len < framelen) continue; - if (xbee_proto_parse_frame(dev) < 0) + if (xbee_proto_parse_frame(dev) < 0) { ;//XXX stats + } dev->frame_len = 0; } }