From patchwork Thu Dec 3 00:24:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 5177 Return-Path: Received: from fmmailgate03.web.de (fmmailgate03.web.de [217.72.192.234]) by open-mesh.net (Postfix) with ESMTP id 755CF15423E for ; Thu, 3 Dec 2009 01:07:55 +0000 (UTC) Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate03.web.de (Postfix) with ESMTP id 852AD136E50C5 for ; Thu, 3 Dec 2009 01:24:08 +0100 (CET) Received: from [78.54.13.193] (helo=localhost) by smtp06.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.110 #314) id 1NFzUO-0005iQ-00 for b.a.t.m.a.n@lists.open-mesh.net; Thu, 03 Dec 2009 01:24:08 +0100 Date: Thu, 3 Dec 2009 01:24:07 +0100 From: Linus =?utf-8?Q?L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.net Message-ID: <20091203002407.GA10048@Linus-Debian> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linus.luessing@web.de X-Sender: linus.luessing@web.de X-Provags-ID: V01U2FsdGVkX19ivqx9YKbra4xyBycUqsRwWjcjA77HDjhi8eDu amRHn3qZAGuoAL0ENB+R2ph8QsRUX7WZmWiYWFUAzehelt+E5P BBXqmaxPPkn5dVkn+nLA== Subject: [B.A.T.M.A.N.] [PATCH] Updating orig_str for debug X-BeenThere: b.a.t.m.a.n@lists.open-mesh.net X-Mailman-Version: 2.1.11 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: Thu, 03 Dec 2009 01:07:55 -0000 In commit 1488 the orig_str has been removed from purge_orig_neighbours(). Apparently, this breaks compilation when enabling debug-flags, as bat_dbg() is expecting this variable as a parameter. Actually, this variable has never been initialised also before commit 1488 (which was probably the reason for mistakenly removing it). This tiny patch adds the orig_str again, but initialises it now as well. Signed-off-by: Linus Lüssing Index: originator.c =================================================================== --- originator.c (revision 1489) +++ originator.c (working copy) @@ -163,7 +163,7 @@ struct neigh_node **best_neigh_node) { struct list_head *list_pos, *list_pos_tmp; - char neigh_str[ETH_STR_LEN]; + char neigh_str[ETH_STR_LEN], orig_str[ETH_STR_LEN]; struct neigh_node *neigh_node; bool neigh_purged = false; @@ -179,6 +179,7 @@ ((PURGE_TIMEOUT * HZ) / 1000)))) { addr_to_string(neigh_str, neigh_node->addr); + addr_to_string(orig_str, orig_node->orig); bat_dbg(DBG_BATMAN, "Neighbour timeout: originator %s, neighbour: %s, last_valid %lu\n", orig_str, neigh_str, (neigh_node->last_valid / HZ)); neigh_purged = true;