# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../net-snmp/net-snmp-5.7.1-0001-fix-disable-set.patch # Copyright (C) 2012 The OpenSDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- From: Dave Shield Date: Tue, 28 Feb 2012 09:27:11 +0000 (+0000) Subject: Skip SET-based baby-steps when compiled with --disable-set-support. X-Git-Tag: v5.5.2.pre1~10 X-Git-Url: http://net-snmp.git.sourceforge.net/git/gitweb.cgi?p=net-snmp%2Fnet-snmp;a=commitdiff_plain;h=eed0bcbc43fea18259f0f63b2081b6d10535a052 Skip SET-based baby-steps when compiled with --disable-set-support. Inspired by bug #3454168 --- diff --git a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c index afe7e57..7da7ba0 100644 --- a/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c +++ b/agent/mibgroup/ip-mib/ipDefaultRouterTable/ipDefaultRouterTable_interface.c @@ -222,6 +222,13 @@ _ipDefaultRouterTable_initialize_interface */ if (access_multiplexer->object_lookup) mfd_modes |= BABY_STEP_OBJECT_LOOKUP; + if (access_multiplexer->pre_request) + mfd_modes |= BABY_STEP_PRE_REQUEST; + if (access_multiplexer->post_request) + mfd_modes |= BABY_STEP_POST_REQUEST; + +#ifndef NETSNMP_DISABLE_SET_SUPPORT + /* XXX - are these actually necessary? */ if (access_multiplexer->set_values) mfd_modes |= BABY_STEP_SET_VALUES; if (access_multiplexer->irreversible_commit) @@ -229,11 +236,6 @@ _ipDefaultRouterTable_initialize_interface if (access_multiplexer->object_syntax_checks) mfd_modes |= BABY_STEP_CHECK_OBJECT; - if (access_multiplexer->pre_request) - mfd_modes |= BABY_STEP_PRE_REQUEST; - if (access_multiplexer->post_request) - mfd_modes |= BABY_STEP_POST_REQUEST; - if (access_multiplexer->undo_setup) mfd_modes |= BABY_STEP_UNDO_SETUP; if (access_multiplexer->undo_cleanup) @@ -249,6 +251,7 @@ _ipDefaultRouterTable_initialize_interface mfd_modes |= BABY_STEP_COMMIT; if (access_multiplexer->undo_commit) mfd_modes |= BABY_STEP_UNDO_COMMIT; +#endif handler = netsnmp_baby_steps_handler_get(mfd_modes); netsnmp_inject_handler(reginfo, handler);