From owner-freebsd-ports@FreeBSD.ORG Tue Feb 19 18:27:55 2013 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 14AE2A12 for ; Tue, 19 Feb 2013 18:27:55 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from mx.tetcu.info (mx.tetcu.info [217.19.15.179]) by mx1.freebsd.org (Postfix) with ESMTP id B576EC32 for ; Tue, 19 Feb 2013 18:27:54 +0000 (UTC) Received: from it.tim.tetcu.info (unknown [188.26.251.190]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx.tetcu.info (Postfix) with ESMTPSA id 8E0562B6AB2; Tue, 19 Feb 2013 20:21:10 +0200 (EET) Date: Tue, 19 Feb 2013 20:21:09 +0200 From: Ion-Mihai Tetcu To: birch Subject: Re: FreeBSD apcupsd port - patch for APC 9606 SNMP cards Message-ID: <20130219202109.61d6076a@it.tim.tetcu.info> In-Reply-To: <5123B375.30307@naturalpoint.com> References: <500844D0.2040708@naturalpoint.com> <5123B375.30307@naturalpoint.com> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: ports@FreeBSD.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2013 18:27:55 -0000 I have no problem integrating this patch, but it should be really submitted upstream ... On Tue, 19 Feb 2013 09:16:37 -0800 birch wrote: > Hello again, > > Just did an upgrade to FreeBSD 9.1 and I noticed that the apcupsd > port still has this crash and requires the patch. It would be > fantastic if the patch below could be integrated into the port for > those of us who are using 9606 SNMP cards. > > Also adding a CC to ports@FreeBSD.org in case the email address for > the port maintainer is not being checked. > > Many thanks! > > birch > > > > --- > sysutils/apcupsd/work/apcupsd-3.14.10/src/drivers/snmplite/apc-mib.cpp > +++ > sysutils/apcupsd/work/apcupsd-3.14.10/src/drivers/snmplite/apc-mib.cpp > @@ -307,6 +307,8 @@ break; > > case CI_Overload: > + if (data.str.len() < 9) > + break; > Dmsg1(80, "Got CI_Overload: %c\n", data.str[8]); > if (data.str[8] == '1') > ups->set_overload(); > > > > birch wrote on 7/19/2012 10:33 AM: > > Hello, > > > > The current version of apcupsd in the ports tree for FreeBSD 8.3 no > > longer works with APC ups's connected via APC 9606 SNMP cards. > > Would it be possible to get the following patch added to the port, > > and/or passed upstream? > > > > > > The link below describes the problem and fix in more detail, I have > > included their patch in this email. I have verified that this patch > > fixes resolves the issue on FreeBSD 8.3 and allows apcupsd to run > > without crashing on startup. > > > > > > Thank you, > > birch > > > > "Debian Bug report logs - #655741" > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655741 > > > > > > Here is the patch as I tested it : > > > > --- > > sysutils/apcupsd/work/apcupsd-3.14.10/src/drivers/snmplite/apc-mib.cpp > > +++ > > sysutils/apcupsd/work/apcupsd-3.14.10/src/drivers/snmplite/apc-mib.cpp > > @@ -307,6 +307,8 @@ break; > > > > case CI_Overload: > > + if (data.str.len() < 9) > > + break; > > Dmsg1(80, "Got CI_Overload: %c\n", data.str[8]); > > if (data.str[8] == '1') > > ups->set_overload(); > -- IOnut - Un^d^dregistered ;) FreeBSD "user" "Intellectual Property" is nowhere near as valuable as "Intellect" FreeBSD committer -> itetcu@FreeBSD.org, PGP Key ID F0808380