Blame SOURCES/net-snmp-5.7.3-iterator-fix.patch

23ac29
diff -urNp old/agent/mibgroup/host/data_access/swrun.c new/agent/mibgroup/host/data_access/swrun.c
23ac29
--- old/agent/mibgroup/host/data_access/swrun.c	2017-07-18 09:44:00.626109526 +0200
23ac29
+++ new/agent/mibgroup/host/data_access/swrun.c	2017-07-19 15:27:50.452255836 +0200
23ac29
@@ -102,6 +102,10 @@ swrun_count_processes_by_name( char *nam
23ac29
         return 0;    /* or -1 */
23ac29
 
23ac29
     it = CONTAINER_ITERATOR( swrun_container );
23ac29
+    if((entry  = (netsnmp_swrun_entry*)ITERATOR_FIRST( it )) != NULL) {
23ac29
+        if (0 == strcmp( entry->hrSWRunName, name ))
23ac29
+            i++;
23ac29
+    }
23ac29
     while ((entry = (netsnmp_swrun_entry*)ITERATOR_NEXT( it )) != NULL) {
23ac29
         if (0 == strcmp( entry->hrSWRunName, name ))
23ac29
             i++;