The following commit has been merged in the master branch: commit 918188530af0e1df849d52eb411cf692ca9b41d2 Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Aug 14 00:08:00 2006 +0200
crash fix
diff --git a/CHANGELOG b/CHANGELOG index de0a0fa..c1ae006 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,4 +17,4 @@ bug fixes: - performance improvement in update_routes() - performance improvement in purge() - JITTER removed -- fix crash in purge() - check for bidirectional neighbour \ No newline at end of file +- fix crash in purge() - check for router before route is deleted \ No newline at end of file diff --git a/batman.c b/batman.c index 3232515..23fb80b 100755 --- a/batman.c +++ b/batman.c @@ -785,7 +785,7 @@ void purge()
list_del(orig_pos);
- if ( isBidirectionalNeigh( orig_node ) ) { + if ( orig_node->router != 0 ) {
if (debug_level >= 2) output("Deleting route to originator \n"); @@ -806,11 +806,11 @@ void send_vis_packet() struct list_head *pos; struct orig_node *orig_node; unsigned char *packet; - + int step = 5, size=5,cnt=0; - + packet = alloc_memory( size * sizeof(unsigned char)); - + list_for_each(pos, &orig_list) { orig_node = list_entry(pos, struct orig_node, list); if(cnt >= size)