From 169976f90a728d07aa2e9f353ebdf848095cc35f Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Fri, 7 Mar 2014 05:21:01 +0000 Subject: [PATCH] fix ignore command --- sys/shell/commands/sc_transceiver.c | 2 +- sys/transceiver/transceiver.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/shell/commands/sc_transceiver.c b/sys/shell/commands/sc_transceiver.c index b5caa0a268..8df24c78fb 100644 --- a/sys/shell/commands/sc_transceiver.c +++ b/sys/shell/commands/sc_transceiver.c @@ -319,7 +319,7 @@ void _transceiver_set_ignore_handler(int argc, char **argv) msg_t mesg; mesg.content.ptr = (char*) &tcmd; - a = atoi(addr + 4); + a = atoi(argv[1]); printf("[transceiver] trying to add address %" PRIu16 " to the ignore list \n", a); mesg.type = DBG_IGN; msg_send_receive(&mesg, &mesg, transceiver_pid); diff --git a/sys/transceiver/transceiver.c b/sys/transceiver/transceiver.c index f047274ff2..34a2b0dae1 100644 --- a/sys/transceiver/transceiver.c +++ b/sys/transceiver/transceiver.c @@ -464,10 +464,10 @@ static void receive_packet(uint16_t type, uint8_t pos) #ifdef DBG_IGNORE for (uint8_t i = 0; (i < MAX_IGNORED_ADDR) && (ignored_addr[i]); i++) { - DEBUG("check if source (%u) is ignored -> %u\n", trans_p->src, ignored_addr[i]); + DEBUG("check if source (%u) is ignored -> %u\n", transceiver_buffer[transceiver_buffer_pos].src, ignored_addr[i]); - if (trans_p->src == ignored_addr[i]) { - DEBUG("ignored packet from %" PRIu16 "\n", trans_p->src); + if (transceiver_buffer[transceiver_buffer_pos].src == ignored_addr[i]) { + DEBUG("ignored packet from %" PRIu16 "\n", transceiver_buffer[transceiver_buffer_pos].src); return; } }