From patchwork Wed Apr 17 20:56:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 2903 Return-Path: Received: from nm7-vm0.bullet.mail.ird.yahoo.com (nm7-vm0.bullet.mail.ird.yahoo.com [77.238.189.222]) by open-mesh.org (Postfix) with SMTP id 8E48E601FE0 for ; Wed, 17 Apr 2013 22:56:09 +0200 (CEST) Received: from [77.238.189.51] by nm7.bullet.mail.ird.yahoo.com with NNFMP; 17 Apr 2013 20:56:09 -0000 Received: from [217.146.189.96] by tm4.bullet.mail.ird.yahoo.com with NNFMP; 17 Apr 2013 20:56:09 -0000 Received: from [127.0.0.1] by smtp112.mail.ird.yahoo.com with NNFMP; 17 Apr 2013 20:56:09 -0000 X-Yahoo-Newman-Id: 214669.27772.bm@smtp112.mail.ird.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Uq2TfLoVM1nmPX2yJVimjVhDddMypusZAml04f8ODzz6B2h sjf9dRTjAaNrOjG8TE0ayzH3CSPe9DwlTsUNpA2o.arIv_NDAyUsEoB9w0sB VWgTnLzlSJIseih1cKysj1wm4Eou6adGT_AcfRz_S5_uzSfA332uDxq.S3r2 Amz0mdYBWhC3oQZs0Jx.NHUiya0QHLeibF1DSfBohSiAMV_fpwu_1DQBf.N1 2F.vUiT1XrmQAIUlYMnX_cZpGdrBaNstmU2DPg6cYLGDAXde.LcnF0OLbfVq _DdqgB_id51KbSsO20o0i0gid9X7vjOPt0KJZ1RrcvJf01.jqDLUiNx9DzhO RdmobuyxfV45bk1FhXVPgqNAnC_jIwlPyK.tUxpNbh3919m66RUo6kkMbd2_ vknRjVhdKxEFhOHF5ANO4yOh6v8b88D9w.gze2OUhnXpsPYbfNaxo X-Yahoo-SMTP: tW.h3tiswBBMXO2coYcbPigGD5Lt6zY_.Zc- X-Rocket-Received: from localhost (lindner_marek@78.46.248.235 with plain) by smtp112.mail.ird.yahoo.com with SMTP; 17 Apr 2013 13:56:09 -0700 PDT From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 18 Apr 2013 04:56:03 +0800 Message-Id: <1366232163-26251-1-git-send-email-lindner_marek@yahoo.de> X-Mailer: git-send-email 1.7.10.4 Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: do not print orig nodes without nc neighbors on nc table print X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 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: Wed, 17 Apr 2013 20:56:09 -0000 Signed-off-by: Marek Lindner --- network-coding.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/network-coding.c b/network-coding.c index c93df9e..b1c733a 100644 --- a/network-coding.c +++ b/network-coding.c @@ -1760,6 +1760,13 @@ int batadv_nc_nodes_seq_print_text(struct seq_file *seq, void *offset) /* For each orig_node in this bin */ rcu_read_lock(); hlist_for_each_entry_rcu(orig_node, head, hash_entry) { + /* no need to print the orig node if it does not have + * network coding neighbors + */ + if (list_empty(&orig_node->in_coding_list) && + list_empty(&orig_node->out_coding_list)) + continue; + seq_printf(seq, "Node: %pM\n", orig_node->orig); seq_puts(seq, " Ingoing: ");