THE SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "route.h"
#include "message.h"
#include "resend.h"
+#include "babel_errors.h"
struct neighbour *neighs = NULL;
neigh = malloc(sizeof(struct neighbour));
if(neigh == NULL) {
- zlog_err("malloc(neighbour): %s", safe_strerror(errno));
+ flog_err(EC_BABEL_MEMORY, "malloc(neighbour): %s",
+ safe_strerror(errno));
return NULL;
}
int rc = 0;
if(hello < 0) {
- if(neigh->hello_interval <= 0)
+ if(neigh->hello_interval == 0)
return rc;
missed_hellos =
((int)timeval_minus_msec(&babel_now, &neigh->hello_time) -
if(missed_hellos > 0) {
neigh->reach >>= missed_hellos;
neigh->hello_seqno = seqno_plus(neigh->hello_seqno, missed_hellos);
- missed_hellos = 0;
rc = 1;
}
}
unsigned
-check_neighbours()
+check_neighbours(void)
{
struct neighbour *neigh;
int changed, rc;