fix ignore command

This commit is contained in:
Oleg Hahm 2014-03-07 05:21:01 +00:00
parent 0c9fd83693
commit 169976f90a
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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;
}
}