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

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