Revision 1271 introduced a bug on the call to hash->compare() that caused duplicate routes to appear in the output. Inverted the conditional and now it works.
Signed-off-by: Edwe Cowley edwecowley@gmail.com Index: batman/hash.c =================================================================== --- batman/hash.c (revision 1343) +++ batman/hash.c (working copy) @@ -179,7 +179,7 @@ bucket = hash->table[index];
while (bucket != NULL) { - if (hash->compare(bucket->data, data)) + if (!(hash->compare(bucket->data, data))) return -1;
prev_bucket = bucket; @@ -217,7 +217,7 @@ bucket = hash->table[index];
while (bucket != NULL) { - if (hash->compare(bucket->data, keydata)) + if (!(hash->compare(bucket->data, keydata))) return bucket->data;
bucket = bucket->next; @@ -260,7 +260,7 @@ hash_it_t.prev_bucket = NULL;
while (hash_it_t.bucket != NULL) { - if (hash->compare(hash_it_t.bucket->data, data)) { + if (!(hash->compare(hash_it_t.bucket->data, data))) { hash_it_t.first_bucket = (hash_it_t.bucket == hash->table[hash_it_t.index] ? &hash->table[ hash_it_t.index ] : NULL); return hash_remove_bucket(hash, &hash_it_t); }