Skip to content

Commit

Permalink
rabbit: update remaining xbee_disc_nd_parse() calls to include length…
Browse files Browse the repository at this point in the history
…, due to recent API change
  • Loading branch information
tomlogic committed Nov 27, 2012
1 parent 7b31190 commit be1104f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions samples/rabbit/AT_remote.c
Expand Up @@ -165,7 +165,7 @@ int xbee_discovery_cluster_handler(const wpan_envelope_t FAR *envelope,

printf("Discovery cluster handler\n");

if (xbee_disc_nd_parse(&node_id, envelope->payload) == 0) {
if (xbee_disc_nd_parse(&node_id, envelope->payload, envelope->length) == 0) {
node_add(&node_id);
xbee_disc_node_id_dump(&node_id);
}
Expand Down Expand Up @@ -408,7 +408,8 @@ int xbee_nd_cmd_response_handler(xbee_dev_t *xbee, const void FAR *raw,
{
/* this is a successful ATND response, parse the response
* and add the discovered node to our node table */
if (xbee_disc_nd_parse(&node_id, resp->value) == 0)
if (xbee_disc_nd_parse(&node_id, resp->value,
length - offsetof( xbee_frame_local_at_resp_t, value)) == 0)
{
tab_node = node_add(&node_id);
if (tab_node)
Expand Down
2 changes: 1 addition & 1 deletion src/xbee/xbee_sxa.c
Expand Up @@ -326,7 +326,7 @@ int _sxa_disc_process_node_data( xbee_dev_t *xbee, const void FAR *raw,
return -EINVAL;
}

if (xbee_disc_nd_parse( &node_id, raw) == 0)
if (xbee_disc_nd_parse( &node_id, raw, length) == 0)
{
sxa = sxa_node_add( xbee, &node_id);
#ifdef XBEE_DISCOVERY_VERBOSE
Expand Down

0 comments on commit be1104f

Please sign in to comment.