From: Antonio Quartulli <ordex@autistici.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: use orig_hash_find() instead of get_orig_node() in TT code
Date: Mon, 10 Oct 2011 14:28:45 +0200 [thread overview]
Message-ID: <1318249725-19865-1-git-send-email-ordex@autistici.org> (raw)
get_orig_node() tries to retrieves an orig_node object and possibly creates it if
not present. This is not the wanted behaviours in the translation-table code,
instead we want to get the orig_node only if it really exists, without creating
it.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
translation-table.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/translation-table.c b/translation-table.c
index 7de9960..6102cd2 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -1170,11 +1170,11 @@ static bool send_other_tt_response(struct bat_priv *bat_priv,
(tt_request->flags & TT_FULL_TABLE ? 'F' : '.'));
/* Let's get the orig node of the REAL destination */
- req_dst_orig_node = get_orig_node(bat_priv, tt_request->dst);
+ req_dst_orig_node = orig_hash_find(bat_priv, tt_request->dst);
if (!req_dst_orig_node)
goto out;
- res_dst_orig_node = get_orig_node(bat_priv, tt_request->src);
+ res_dst_orig_node = orig_hash_find(bat_priv, tt_request->src);
if (!res_dst_orig_node)
goto out;
@@ -1300,7 +1300,7 @@ static bool send_my_tt_response(struct bat_priv *bat_priv,
my_ttvn = (uint8_t)atomic_read(&bat_priv->ttvn);
req_ttvn = tt_request->ttvn;
- orig_node = get_orig_node(bat_priv, tt_request->src);
+ orig_node = orig_hash_find(bat_priv, tt_request->src);
if (!orig_node)
goto out;
--
1.7.3.4
next reply other threads:[~2011-10-10 12:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 12:28 Antonio Quartulli [this message]
2011-10-12 12:54 ` [B.A.T.M.A.N.] [PATCHv2] batman-adv: use orig_hash_find() instead of get_orig_node() in TT code Antonio Quartulli
2011-10-12 15:11 ` Marek Lindner
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=1318249725-19865-1-git-send-email-ordex@autistici.org \
--to=ordex@autistici.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/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;
as well as URLs for NNTP newsgroup(s).