[trickle/f16] fix endless loop

Nicoleau Fabien eponyme at fedoraproject.org
Sun Sep 18 20:56:44 UTC 2011


commit b712f053fa24f634257994537f1253d30a184756
Author: Alon Levy <alevy at redhat.com>
Date:   Sun Sep 18 22:58:40 2011 +0200

    fix endless loop

 ...le-1.07-bwsta_getdelay-stop-if-no-packets.patch |   25 ++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/trickle-1.07-bwsta_getdelay-stop-if-no-packets.patch b/trickle-1.07-bwsta_getdelay-stop-if-no-packets.patch
new file mode 100644
index 0000000..f9245b4
--- /dev/null
+++ b/trickle-1.07-bwsta_getdelay-stop-if-no-packets.patch
@@ -0,0 +1,25 @@
+From 3b22c327ff6ac3ee51332919e91ae63d47225a9b Mon Sep 17 00:00:00 2001
+From: Alon Levy <alevy at redhat.com>
+Date: Thu, 15 Sep 2011 18:05:13 +0300
+Subject: [PATCH] bwsta_getdelay: stop if no packets
+
+---
+ bwstat.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/bwstat.c b/bwstat.c
+index a1c1085..9567275 100644
+--- a/bwstat.c
++++ b/bwstat.c
+@@ -210,7 +210,7 @@ bwstat_getdelay(struct bwstat *bs, size_t *len, uint lim, short which)
+ 
+    ent += xent;
+   }
+- } while (pool > 0 && ncli > 0);
++ } while (pool > 0 && ncli > 0 && (TAILQ_FIRST(&poolq) != TAILQ_END(&poolq)));
+ 
+  /*
+   * This is the case of a client that is not using its limit.
+-- 
+1.7.6.2
+


More information about the scm-commits mailing list