public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: "Martin Hundebøll" <martin@hundeboll.net>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH 4/5] batman-adv: update ttvn in case of client reannouncement
Date: Wed, 18 Apr 2012 10:46:13 +0200	[thread overview]
Message-ID: <4F8E7F55.8080105@hundeboll.net> (raw)
In-Reply-To: <1334701645-25862-5-git-send-email-ordex@autistici.org>

Hi,

On 04/18/2012 12:27 AM, Antonio Quartulli wrote:
> in various scenarios it would be possible that a node receives an ADD event for
> a client it already knows to belong to the advertiser. In this case the node has
> to update the global entry ttvn with the one carried by the OGM.
>
> Signed-off-by: Antonio Quartulli<ordex@autistici.org>
> ---
>   translation-table.c |   11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/translation-table.c b/translation-table.c
> index cd6c2dd..ab295ee 100644
> --- a/translation-table.c
> +++ b/translation-table.c
> @@ -593,6 +593,7 @@ int tt_global_add(struct bat_priv *bat_priv, struct orig_node *orig_node,
>   		  bool wifi)
>   {
>   	struct tt_global_entry *tt_global_entry = NULL;
> +	struct tt_orig_list_entry *orig_entry;
>   	int ret = 0;
>   	int hash_added;
>
> @@ -640,9 +641,17 @@ int tt_global_add(struct bat_priv *bat_priv, struct orig_node *orig_node,
>   			tt_global_entry->roam_at = 0;
>   		}
>
> -		if (!tt_global_entry_has_orig(tt_global_entry, orig_node))
> +		orig_entry = tt_global_entry_has_orig(tt_global_entry,
> +						      orig_node);
> +		if (!orig_entry)
>   			tt_global_add_orig_entry(tt_global_entry, orig_node,
>   						 ttvn);
> +		else
> +			/* if we are "adding" global entry, we may want to
> +			 * update the ttvn anyway. Perhaps the global entry is
> +			 * here with a wrong ttvn because it was temporary added
> +			 * before */

One more bad-ending comment block :)

-- 
Kind Regards
Martin Hundebøll
Frederiks Allé 99A, 1.th
8000 Aarhus C
Denmark
+45 61 65 54 61
martin@hundeboll.net

  reply	other threads:[~2012-04-18  8:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17 22:27 [B.A.T.M.A.N.] [PATCH 0/5] Preparation for SPEEDY_JOIN/ROAM Antonio Quartulli
2012-04-17 22:27 ` [B.A.T.M.A.N.] [PATCH 1/5] batman-adv: don't delay OGM information announcement Antonio Quartulli
2012-04-18  8:12   ` Martin Hundebøll
2012-04-18  8:31     ` Antonio Quartulli
2012-04-18  8:35       ` Martin Hundebøll
2012-04-18  8:37         ` Antonio Quartulli
2012-04-17 22:27 ` [B.A.T.M.A.N.] [PATCH 2/5] batman-adv: clear ADD+DEL (and viceversa) events in the same orig-interval Antonio Quartulli
2012-04-18  8:33   ` Martin Hundebøll
2012-04-18  8:37     ` Antonio Quartulli
2012-04-18  8:40       ` Martin Hundebøll
2012-04-17 22:27 ` [B.A.T.M.A.N.] [PATCH 3/5] batman-adv: let tt_global_entry_has_orig() return the orig_entry or NULL instead of 1 or 0 only Antonio Quartulli
2012-04-18  8:44   ` Martin Hundebøll
2012-04-17 22:27 ` [B.A.T.M.A.N.] [PATCH 4/5] batman-adv: update ttvn in case of client reannouncement Antonio Quartulli
2012-04-18  8:46   ` Martin Hundebøll [this message]
2012-04-17 22:27 ` [B.A.T.M.A.N.] [PATCH 5/5] batman-adv: beautify tt_global_add() argument list Antonio Quartulli
2012-04-18  8:52   ` Martin Hundebøll

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=4F8E7F55.8080105@hundeboll.net \
    --to=martin@hundeboll.net \
    --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