public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.net>
Subject: [B.A.T.M.A.N.] [vis] Remove duplicate routes from vis output (revised)
Date: Thu, 16 Jul 2009 01:37:39 +0800	[thread overview]
Message-ID: <200907160137.39536.lindner_marek@yahoo.de> (raw)
In-Reply-To: <dd8d36130907150659v74773aw1fd1060c43ab337b@mail.gmail.com>


Revision 1271 introduced a bug on the call to hash->compare() that
caused duplicate routes to appear in the vis output.  Adapting the 
hash->compare() callback fixes the problem.

Signed-off-by: Edwe Cowley <edwecowley@gmail.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>

Index: vis/vis.c
===================================================================
--- vis/vis.c	(revision 1343)
+++ vis/vis.c	(working copy)
@@ -119,8 +119,9 @@
 	return stop != 0;
 }
 
-int32_t orig_comp(void *data1, void *data2) {
-	return(memcmp(data1, data2, 4));
+int32_t orig_comp(void *data1, void *data2)
+{
+	return (memcmp(data1, data2, 4) == 0 ? 1 : 0);
 }
 
 /* hashfunction to choose an entry in a hash table of given size */


      parent reply	other threads:[~2009-07-15 17:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 13:59 [B.A.T.M.A.N.] [vis] Remove duplicate routes from vis output Edwe Cowley
2009-07-15 17:21 ` Marek Lindner
2009-07-16  6:57   ` Edwe Cowley
2009-07-16 10:42     ` Marek Lindner
2009-07-15 17:37 ` Marek Lindner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200907160137.39536.lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox