diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-10-05 04:26:02 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-10-05 04:26:02 +0200 |
commit | bb7392551ed8578171941b81cf3ed2cfc4ad2b1b (patch) | |
tree | 3b0573ddba0befc829c460ee56e905f0ba2d64f2 /ffd/neigh.c | |
parent | b760b28c21515265f8d09c46011290a9a22b871e (diff) | |
download | ffd-bb7392551ed8578171941b81cf3ed2cfc4ad2b1b.tar ffd-bb7392551ed8578171941b81cf3ed2cfc4ad2b1b.zip |
Lots of update handling
Diffstat (limited to 'ffd/neigh.c')
-rw-r--r-- | ffd/neigh.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ffd/neigh.c b/ffd/neigh.c index 9788d3f..02a3318 100644 --- a/ffd/neigh.c +++ b/ffd/neigh.c @@ -64,6 +64,9 @@ uint16_t ffd_neigh_get_rxcost(const ffd_neigh_t *neigh) { } uint16_t ffd_neigh_get_cost(const ffd_neigh_t *neigh) { + if (!neigh) /* self */ + return 0; + uint16_t txcost = neigh->txcost; if (txcost < 256) txcost = 256; @@ -77,5 +80,5 @@ uint16_t ffd_neigh_get_cost(const ffd_neigh_t *neigh) { } void ffd_neigh_reset(ffd_iface_t *iface, ffd_neigh_t *neigh) { - ffd_send_announce_request(iface, neigh, FFD_NODE_ID_UNSPEC, 0, 0); + ffd_send_announce_request(iface, neigh, FFD_NODE_ID_UNSPEC, 0, 0, true /* XXX change this later */); } |