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

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