]> git.pld-linux.org Git - packages/net-snmp.git/commitdiff
- backport bug 3460364 (Fix use of block factor when detecting error conditions) auto/th/net-snmp-5_7_1-7
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 21 May 2012 14:04:51 +0000 (14:04 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bug-3460364.patch -> 1.1
    net-snmp.spec -> 1.194

bug-3460364.patch [new file with mode: 0644]
net-snmp.spec

diff --git a/bug-3460364.patch b/bug-3460364.patch
new file mode 100644 (file)
index 0000000..6b42d09
--- /dev/null
@@ -0,0 +1,40 @@
+From: Dave Shield <D.T.Shield@liverpool.ac.uk>
+Date: Tue, 28 Feb 2012 10:44:41 +0000 (+0000)
+Subject: CHANGES: snmpd: BUGS: 3460364: Fix use of block factor when detecting error conditions
+X-Git-Tag: v5.6.2.pre1~18
+X-Git-Url: http://net-snmp.git.sourceforge.net/git/gitweb.cgi?p=net-snmp%2Fnet-snmp;a=commitdiff_plain;h=879bf7079d34fa46f6fcf54a01c8500beaece59a
+
+CHANGES: snmpd: BUGS: 3460364: Fix use of block factor when detecting error conditions
+---
+
+diff --git a/agent/mibgroup/ucd-snmp/disk_hw.c b/agent/mibgroup/ucd-snmp/disk_hw.c
+index ba26479..2b80476 100644
+--- a/agent/mibgroup/ucd-snmp/disk_hw.c
++++ b/agent/mibgroup/ucd-snmp/disk_hw.c
+@@ -389,8 +389,9 @@ tryAgain:
+     case ERRORFLAG:
+         long_ret = 0;
++        val = netsnmp_fsys_avail_ull(entry);
+         if (( entry->minspace >= 0 ) &&
+-            ( entry->avail < entry->minspace ))
++            ( val < entry->minspace ))
+             long_ret = 1;
+         else if (( entry->minpercent >= 0 ) &&
+                  (_percent( entry->avail, entry->size ) < entry->minpercent ))
+@@ -399,12 +400,13 @@ tryAgain:
+     case ERRORMSG:
+         errmsg[0] = 0;
++        val = netsnmp_fsys_avail_ull(entry);
+         if (( entry->minspace >= 0 ) &&
+-            ( entry->avail < entry->minspace ))
++            ( val < entry->minspace ))
+                 snprintf(errmsg, sizeof(errmsg),
+                         "%s: less than %d free (= %d)",
+                         entry->path, entry->minspace,
+-                        (int) entry->avail);
++                        (int) val);
+         else if (( entry->minpercent >= 0 ) &&
+                  (_percent( entry->avail, entry->size ) < entry->minpercent ))
+                 snprintf(errmsg, sizeof(errmsg),
index 1be8e91b50dd42bae0ddbaa2751d9f5f7ab6785b..4e94ee8eb02e4073dcf509de4686bcc985908e87 100644 (file)
@@ -26,7 +26,7 @@ Summary(ru.UTF-8):    Набор утилит для протокола SNMP от U
 Summary(uk.UTF-8):     Набір утиліт для протоколу SNMP від UC-Davis
 Name:          net-snmp
 Version:       5.7.1
-Release:       6
+Release:       7
 License:       BSD-like
 Group:         Networking/Daemons
 Source0:       http://downloads.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
@@ -57,7 +57,8 @@ Patch13:      %{name}-TCP_STATS_CACHE_TIMEOUT.patch
 Patch14:       %{name}-libnl.patch
 Patch15:       %{name}-libpci-init.patch
 Patch16:       %{name}-recognize-reiserfs.patch
-Patch17:       net-snmp-logging.patch
+Patch17:       %{name}-logging.patch
+Patch18:       bug-3460364.patch
 URL:           http://www.net-snmp.org/
 BuildRequires: autoconf >= 2.63
 BuildRequires: automake
@@ -439,6 +440,7 @@ SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
 %patch15 -p1
 %patch16 -p1
 %patch17 -p1
+%patch18 -p1
 
 %build
 %{__libtoolize}
This page took 0.041924 seconds and 4 git commands to generate.