fix ignore command
This commit is contained in:
parent
0c9fd83693
commit
169976f90a
@ -319,7 +319,7 @@ void _transceiver_set_ignore_handler(int argc, char **argv)
|
|||||||
msg_t mesg;
|
msg_t mesg;
|
||||||
mesg.content.ptr = (char*) &tcmd;
|
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);
|
printf("[transceiver] trying to add address %" PRIu16 " to the ignore list \n", a);
|
||||||
mesg.type = DBG_IGN;
|
mesg.type = DBG_IGN;
|
||||||
msg_send_receive(&mesg, &mesg, transceiver_pid);
|
msg_send_receive(&mesg, &mesg, transceiver_pid);
|
||||||
|
|||||||
@ -464,10 +464,10 @@ static void receive_packet(uint16_t type, uint8_t pos)
|
|||||||
#ifdef DBG_IGNORE
|
#ifdef DBG_IGNORE
|
||||||
|
|
||||||
for (uint8_t i = 0; (i < MAX_IGNORED_ADDR) && (ignored_addr[i]); i++) {
|
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]) {
|
if (transceiver_buffer[transceiver_buffer_pos].src == ignored_addr[i]) {
|
||||||
DEBUG("ignored packet from %" PRIu16 "\n", trans_p->src);
|
DEBUG("ignored packet from %" PRIu16 "\n", transceiver_buffer[transceiver_buffer_pos].src);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user