From: Marek Lindner <lindner_marek@yahoo.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCHv4] batman-adv: pass the WIFI flag from the local to global entry
Date: Sat, 25 Aug 2012 13:02:33 +0200 [thread overview]
Message-ID: <201208251302.33951.lindner_marek@yahoo.de> (raw)
In-Reply-To: <1345822986-9079-1-git-send-email-ordex@autistici.org>
On Friday, August 24, 2012 17:43:06 Antonio Quartulli wrote:
> @@ -779,13 +797,22 @@ int batadv_tt_global_add(struct batadv_priv
> *bat_priv, ret = 1;
>
> out_remove:
> + tt_local_entry = batadv_tt_local_hash_find(bat_priv, tt_addr);
> + if (!tt_local_entry)
> + goto out;
> +
> + wifi_flag = tt_local_entry->common.flags & BATADV_TT_CLIENT_WIFI;
> + tt_global_entry->common.flags |= wifi_flag;
> +
> /* remove address from local hash if present */
> - batadv_tt_local_remove(bat_priv, tt_global_entry->common.addr,
> - "global tt received",
> - flags & BATADV_TT_CLIENT_ROAM);
> + __batadv_tt_local_remove(bat_priv, tt_local_entry, "global tt
> received", + flags &
> BATADV_TT_CLIENT_ROAM);
> +
> out:
> if (tt_global_entry)
> batadv_tt_global_entry_free_ref(tt_global_entry);
> + if (tt_local_entry)
> + batadv_tt_local_entry_free_ref(tt_local_entry);
> return ret;
> }
Wouldn't it be much simplier if batadv_tt_local_remove() returned the tt_local
flags somehow ?
Cheers,
Marek
prev parent reply other threads:[~2012-08-25 11:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-24 15:43 [B.A.T.M.A.N.] [PATCHv4] batman-adv: pass the WIFI flag from the local to global entry Antonio Quartulli
2012-08-25 11:02 ` 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=201208251302.33951.lindner_marek@yahoo.de \
--to=lindner_marek@yahoo.de \
--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