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

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