summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2008-03-07 01:47:45 +0000
committerStef Walter <stef@memberwebs.com>2008-03-07 01:47:45 +0000
commitb4ff9814dcddac9adcdcdba7ca2e0585ec8da6bb (patch)
treef0cf3c1f98e98d42cd5a210017596a16ede09ac3 /module
parent268099da7413a4ec19dc8ecc7ea563907bfbd0e4 (diff)
Fix endless loop when more than one device
Diffstat (limited to 'module')
-rw-r--r--module/bsnmp-jails.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/bsnmp-jails.c b/module/bsnmp-jails.c
index f08da30..8fbefb2 100644
--- a/module/bsnmp-jails.c
+++ b/module/bsnmp-jails.c
@@ -464,7 +464,8 @@ monitor_for_device (const char *device)
ASSERT (device);
- while ((mon = TAILQ_FIRST (&monitors)) != NULL) {
+ /* Mark and prepare for sweep below */
+ TAILQ_FOREACH (mon, &monitors, link) {
ASSERT (mon->device);
if (strcmp (mon->device, device) == 0)
return mon;