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