}
/* see if it matches a xmit query (atcmd_query must be NULL) */
- if (ctx->atcmd_query[0] == '\0') {
+ if (ctx->atcmd_query[0] != '\0') {
printf("invalid response 2\n");
return -1;
}
break;
case RC_PROTO_TYPE_RANGE: {
struct rc_proto_range *rcr =
- (struct rc_proto_range *) recvframe;
+ (struct rc_proto_range *) recvframe->data;
if (datalen != sizeof(struct rc_proto_range))
return -1;