Ensure that packet metric is always set.
This commit is contained in:
parent
bf299b1a07
commit
6611291dd0
1 changed files with 4 additions and 6 deletions
|
@ -110,18 +110,16 @@ neighbor_info_packet_sent(int status, int numtx)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINTF("neighbor-info: packet sent to %d.%d, status=%d, numtx=%d\n",
|
packet_metric = numtx;
|
||||||
|
|
||||||
|
PRINTF("neighbor-info: packet sent to %d.%d, status=%d, metric=%u\n",
|
||||||
dest->u8[sizeof(*dest) - 2], dest->u8[sizeof(*dest) - 1],
|
dest->u8[sizeof(*dest) - 2], dest->u8[sizeof(*dest) - 1],
|
||||||
status, numtx);
|
status, (unsigned)packet_metric);
|
||||||
|
|
||||||
switch(status) {
|
switch(status) {
|
||||||
case MAC_TX_OK:
|
case MAC_TX_OK:
|
||||||
packet_metric = numtx;
|
|
||||||
add_neighbor(dest);
|
add_neighbor(dest);
|
||||||
break;
|
break;
|
||||||
case MAC_TX_COLLISION:
|
|
||||||
packet_metric = numtx;
|
|
||||||
break;
|
|
||||||
case MAC_TX_NOACK:
|
case MAC_TX_NOACK:
|
||||||
packet_metric = ETX_NOACK_PENALTY;
|
packet_metric = ETX_NOACK_PENALTY;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue