From patchwork Mon Sep 26 22:49:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1268 Return-Path: Received: from latitanza.investici.org (latitanza.investici.org [82.94.249.234]) by open-mesh.org (Postfix) with ESMTPS id DFD826007E3 for ; Tue, 27 Sep 2011 00:50:46 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@autistici.org; dkim-adsp=pass Received: from [82.94.249.234] (latitanza [82.94.249.234]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id 252CE986AE; Mon, 26 Sep 2011 22:50:46 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 latitanza.investici.org 252CE986AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1317077446; bh=1CklH8Du+AlsD5jhB1lDMrg7u2+4o895+UkjAWNeqoY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=Xk/J7ExJiXJmWitGdJrBFh5eJ90WRuIctyFdh3E58vdNa08oXOzASgqMZfmNzhibA jldlh0Il9y4taaipiRxm7wQBtVeYhhKSVC5jIEcuflUW16VFa66o78UbgLaj+NgfVJ JZ3lwFCMQPQVfsEZ+1gVtJCGDgxa9jDCNuMEy4Hk= From: Antonio Quartulli To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 27 Sep 2011 00:49:57 +0200 Message-Id: <1317077397-15923-1-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <4E80EB52.2010906@wifibot.com> References: <4E80EB52.2010906@wifibot.com> Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Chichek hunt started! Verbose patch X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2011 22:50:47 -0000 Signed-off-by: Antonio Quartulli --- translation-table.c | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/translation-table.c b/translation-table.c index 7de9960..e7bac85 100644 --- a/translation-table.c +++ b/translation-table.c @@ -258,9 +258,14 @@ int tt_changes_fill_buffer(struct bat_priv *bat_priv, spin_lock_bh(&bat_priv->tt_changes_list_lock); atomic_set(&bat_priv->tt_local_changes, 0); + printk("TT_BUG Preparing OGM buffer\n"); + list_for_each_entry_safe(entry, safe, &bat_priv->tt_changes_list, list) { if (count < tot_changes) { + printk("TT_BUG Copying flags: 0x%x addr: %pM\n", + entry->change.flags, + entry->change.addr); memcpy(buff + tt_len(count), &entry->change, sizeof(struct tt_change)); count++; @@ -270,6 +275,8 @@ int tt_changes_fill_buffer(struct bat_priv *bat_priv, } spin_unlock_bh(&bat_priv->tt_changes_list_lock); + printk("TT_BUG Copied %d addresses\n", count); + /* Keep the buffer for possible tt_request */ spin_lock_bh(&bat_priv->tt_buff_lock); kfree(bat_priv->tt_buff); @@ -1407,7 +1414,11 @@ static void _tt_update_changes(struct bat_priv *bat_priv, { int i; + printk("TT_BUG Received %d changes\n", tt_num_changes); + for (i = 0; i < tt_num_changes; i++) { + printk("TT_BUG flags: 0x%x %pM\n", (tt_change + i)->flags, + (tt_change + i)->addr); if ((tt_change + i)->flags & TT_CLIENT_DEL) tt_global_del(bat_priv, orig_node, (tt_change + i)->addr, @@ -1505,12 +1516,16 @@ void handle_tt_response(struct bat_priv *bat_priv, if (!orig_node) goto out; - if (tt_response->flags & TT_FULL_TABLE) + if (tt_response->flags & TT_FULL_TABLE) { + printk("TT_BUG Got full table on response\n"); tt_fill_gtable(bat_priv, tt_response); - else + } + else{ + printk("TT_BUG Got diff\n"); tt_update_changes(bat_priv, orig_node, tt_response->tt_data, tt_response->ttvn, (struct tt_change *)(tt_response + 1)); + } /* Delete the tt_req_node from pending tt_requests list */ spin_lock_bh(&bat_priv->tt_req_list_lock);