Date: Wed, 21 Nov 2012 13:37:10 +0000 (UTC) From: Ryan Steinmetz <zi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r307614 - in head/net-mgmt/net-snmp: . files Message-ID: <201211211337.qALDbAjJ060592@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zi Date: Wed Nov 21 13:37:10 2012 New Revision: 307614 URL: http://svnweb.freebsd.org/changeset/ports/307614 Log: - Fix embedded perl support [1] - Fix segfault during config reload [2] - Bump PORTREVISION PR: ports/173213 [1] Submitted by: Frank Wall <fw@moov.de> [1], Alexey Kouznetsov <alexey@kouznetsov.com> [2] Obtained from: upstream repo [2] Feature safe: yes Added: head/net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c (contents, props changed) Modified: head/net-mgmt/net-snmp/Makefile (contents, props changed) Modified: head/net-mgmt/net-snmp/Makefile ============================================================================== --- head/net-mgmt/net-snmp/Makefile Wed Nov 21 12:20:17 2012 (r307613) +++ head/net-mgmt/net-snmp/Makefile Wed Nov 21 13:37:10 2012 (r307614) @@ -7,6 +7,7 @@ PORTNAME= snmp PORTVERSION= 5.7.2 +PORTREVISION= 1 CATEGORIES= net-mgmt ipv6 MASTER_SITES= SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} PKGNAMEPREFIX= net- @@ -88,7 +89,7 @@ CONFIGURE_ARGS+= --with-openssl="${OPENS CONFIGURE_ARGS+=--with-dummy-values .endif -.if empty(${PORT_OPTIONS:MTKMIB}) +.if empty(PORT_OPTIONS:MTKMIB) EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-local:Makefile.in PLIST_SUB+= WITH_TKMIB="@comment " .else @@ -99,7 +100,7 @@ PLIST_SUB+= WITH_TKMIB="" .if ${PORT_OPTIONS:MPERL} USE_PERL5= yes CONFIGURE_ARGS+=--with-perl-modules -.if empty(${PORT_OPTIONS:MPERL_EMBEDDED}) +.if empty(PORT_OPTIONS:MPERL_EMBEDDED) CONFIGURE_ARGS+=--disable-embedded-perl PLIST_SUB+= WITH_PERL_EMBEDDED="@comment " .else Added: head/net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c Wed Nov 21 13:37:10 2012 (r307614) @@ -0,0 +1,44 @@ +--- ./agent/mibgroup/agent/extend.c.orig 2012-10-09 18:28:58.000000000 -0400 ++++ ./agent/mibgroup/agent/extend.c 2012-10-24 07:46:37.000000000 -0400 +@@ -34,7 +34,7 @@ + size_t oid_len; + long num_entries; + netsnmp_extend *ehead; +- netsnmp_handler_registration *reg[3]; ++ netsnmp_handler_registration *reg[4]; + struct extend_registration_block_s *next; + } extend_registration_block; + extend_registration_block *ereg_head = NULL; +@@ -222,10 +222,13 @@ + rc = netsnmp_register_watched_scalar2( reg, winfo ); + if (rc != SNMPERR_SUCCESS) + goto bail; ++ eptr->reg[3] = reg; + + return eptr; + + bail: ++ if (eptr->reg[3]) ++ netsnmp_unregister_handler(eptr->reg[3]); + if (eptr->reg[2]) + netsnmp_unregister_handler(eptr->reg[2]); + if (eptr->reg[1]) +@@ -267,6 +270,7 @@ + netsnmp_unregister_handler( eptr->reg[0] ); + netsnmp_unregister_handler( eptr->reg[1] ); + netsnmp_unregister_handler( eptr->reg[2] ); ++ netsnmp_unregister_handler( eptr->reg[3] ); + SNMP_FREE(eptr); + } + ereg_head = NULL; +@@ -550,6 +554,10 @@ + } + + eptr = _register_extend( oid_buf, oid_len ); ++ if (!eptr) { ++ snmp_log(LOG_ERR, "Failed to register extend entry '%s' - possibly duplicate name.\n", exec_name ); ++ return; ++ } + extension = _new_extension( exec_name, flags, eptr ); + if (extension) { + extension->command = strdup( exec_command );
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211211337.qALDbAjJ060592>