summaryrefslogtreecommitdiffstats
path: root/source/n/net-snmp/net-snmp-5.7.3-iterator-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/net-snmp/net-snmp-5.7.3-iterator-fix.patch')
-rw-r--r--source/n/net-snmp/net-snmp-5.7.3-iterator-fix.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/n/net-snmp/net-snmp-5.7.3-iterator-fix.patch b/source/n/net-snmp/net-snmp-5.7.3-iterator-fix.patch
new file mode 100644
index 000000000..1505ca9a2
--- /dev/null
+++ b/source/n/net-snmp/net-snmp-5.7.3-iterator-fix.patch
@@ -0,0 +1,14 @@
+diff -urNp old/agent/mibgroup/host/data_access/swrun.c new/agent/mibgroup/host/data_access/swrun.c
+--- old/agent/mibgroup/host/data_access/swrun.c 2018-03-26 09:00:39.932335587 +0200
++++ new/agent/mibgroup/host/data_access/swrun.c 2018-03-26 09:03:00.845876681 +0200
+@@ -102,7 +102,9 @@ swrun_count_processes_by_name( char *nam
+ return 0; /* or -1 */
+
+ it = CONTAINER_ITERATOR( swrun_container );
+- while ((entry = (netsnmp_swrun_entry*)ITERATOR_NEXT( it )) != NULL) {
++ for (entry = (netsnmp_swrun_entry*)ITERATOR_FIRST( it );
++ entry;
++ entry = (netsnmp_swrun_entry*)ITERATOR_NEXT( it )) {
+ if (0 == strcmp( entry->hrSWRunName, name ))
+ i++;
+ }