[Pkg-net-snmp-commits] r164 - branches/net-snmp53/debian/patches

Jochen Friedrich jochen at alioth.debian.org
Wed May 2 13:23:58 UTC 2007


Author: jochen
Date: 2007-05-02 13:23:57 +0000 (Wed, 02 May 2007)
New Revision: 164

Added:
   branches/net-snmp53/debian/patches/40_fix_xen.README
   branches/net-snmp53/debian/patches/40_fix_xen.patch
Log:
Add patch from Upstream SVN for XEN


Added: branches/net-snmp53/debian/patches/40_fix_xen.README
===================================================================
--- branches/net-snmp53/debian/patches/40_fix_xen.README	2007-04-13 17:07:33 UTC (rev 163)
+++ branches/net-snmp53/debian/patches/40_fix_xen.README	2007-05-02 13:23:57 UTC (rev 164)
@@ -0,0 +1,2 @@
+Backport from 5.3 CVS branch to fix XEN problems. From:
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=221911

Added: branches/net-snmp53/debian/patches/40_fix_xen.patch
===================================================================
--- branches/net-snmp53/debian/patches/40_fix_xen.patch	2007-04-13 17:07:33 UTC (rev 163)
+++ branches/net-snmp53/debian/patches/40_fix_xen.patch	2007-05-02 13:23:57 UTC (rev 164)
@@ -0,0 +1,97 @@
+--- snmplib/snmp_logging.c	2006/01/25 16:27:41	5.34.2.1
++++ snmplib/snmp_logging.c	2006/08/11 14:56:45	5.34.2.5
+@@ -86,6 +86,17 @@
+ #include <net-snmp/library/callback.h>
+ #define LOGLENGTH 1024
+ 
++#ifdef va_copy
++#define NEED_VA_END_AFTER_VA_COPY
++#else
++#ifdef __vacopy
++#define vacopy __vacopy
++#define NEED_VA_END_AFTER_VA_COPY
++#else
++#define va_copy(dest, src) memcpy (&dest, &src, sizeof (va_list))
++#endif
++#endif
++
+ /*
+  * logh_head:  A list of all log handlers, in increasing order of priority
+  * logh_priorities:  'Indexes' into this list, by priority
+@@ -1167,19 +1178,32 @@
+     char            buffer[LOGLENGTH];
+     int             length;
+     char           *dynamic;
++    va_list         aq;
+ 
++    va_copy(aq, ap);
+     length = vsnprintf(buffer, LOGLENGTH, format, ap);
++    va_end(ap);
+ 
+-    if (length == 0)
++    if (length == 0) {
++#ifdef NEED_VA_END_AFTER_VA_COPY
++        va_end(aq);
++#endif
+         return (0);             /* Empty string */
++    }
+ 
+     if (length == -1) {
+         snmp_log_string(LOG_ERR, "Could not format log-string\n");
++#ifdef NEED_VA_END_AFTER_VA_COPY
++        va_end(aq);
++#endif
+         return (-1);
+     }
+ 
+     if (length < LOGLENGTH) {
+         snmp_log_string(priority, buffer);
++#ifdef NEED_VA_END_AFTER_VA_COPY
++        va_end(aq);
++#endif
+         return (0);
+     }
+ 
+@@ -1188,12 +1212,16 @@
+         snmp_log_string(LOG_ERR,
+                         "Could not allocate memory for log-message\n");
+         snmp_log_string(priority, buffer);
++#ifdef NEED_VA_END_AFTER_VA_COPY
++        va_end(aq);
++#endif
+         return (-2);
+     }
+ 
+-    vsnprintf(dynamic, length + 1, format, ap);
++    vsnprintf(dynamic, length + 1, format, aq);
+     snmp_log_string(priority, dynamic);
+     free(dynamic);
++    va_end(aq);
+     return 0;
+ }
+ 
+--- agent/mibgroup/if-mib/ifTable/ifTable_data_access.c	2006/07/07 20:25:12	1.18.2.3
++++ agent/mibgroup/if-mib/ifTable/ifTable_data_access.c	2007/02/05 15:10:28	1.18.2.4
+@@ -2,7 +2,7 @@
+  * Note: this file originally auto-generated by mib2c using
+  *       version : 1.17 $ of : mfd-data-access.m2c,v $ 
+  *
+- * $Id: ifTable_data_access.c,v 1.18.2.3 2006/07/07 20:25:12 hardaker Exp $
++ * $Id: ifTable_data_access.c,v 1.18.2.4 2007/02/05 15:10:28 rstory Exp $
+  */
+ /*
+  * standard Net-SNMP includes 
+@@ -203,8 +203,11 @@
+         DEBUGMSGTL(("ifTable:access", "updating existing entry\n"));
+ 
+ #ifdef USING_IF_MIB_IFXTABLE_IFXTABLE_MODULE
+-        netsnmp_assert(strcmp(rowreq_ctx->data.ifName,
+-                              ifentry->name) == 0);
++        {
++            int rc = strcmp(rowreq_ctx->data.ifName,
++                            ifentry->name);
++            netsnmp_assert(rc == 0);
++        }
+ #endif
+         /*
+          * if the interface was missing, but came back, clear the




More information about the Pkg-net-snmp-commits mailing list