From b4ff9814dcddac9adcdcdba7ca2e0585ec8da6bb Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 7 Mar 2008 01:47:45 +0000 Subject: Fix endless loop when more than one device --- module/bsnmp-jails.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module') 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; -- cgit v1.2.3