From owner-svn-ports-all@FreeBSD.ORG Wed Dec 24 06:01:26 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE65B84B; Wed, 24 Dec 2014 06:01:25 +0000 (UTC) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 724531A4E; Wed, 24 Dec 2014 06:01:24 +0000 (UTC) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.9/8.14.9) with ESMTP id sBO6076R003401 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 24 Dec 2014 14:00:07 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.9/8.14.9/Submit) id sBO607Ic003400; Wed, 24 Dec 2014 14:00:07 +0800 (CST) (envelope-from kevlo) Date: Wed, 24 Dec 2014 14:00:06 +0800 From: Kevin Lo To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r375390 - in head/net/ifstated: . files Message-ID: <20141224060006.GA3376@ns.kevlo.org> References: <201412240559.sBO5xXKA011201@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201412240559.sBO5xXKA011201@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 06:01:26 -0000 On Wed, Dec 24, 2014 at 05:59:33AM +0000, Kevin Lo wrote: > Author: kevlo > Date: Wed Dec 24 05:59:32 2014 > New Revision: 375390 > URL: https://svnweb.freebsd.org/changeset/ports/375390 > QAT: https://qat.redports.org/buildarchive/r375390/ > > Log: > Check event_initialized before event_del if event may not have been set > up; libevent2 complains about this. Forgot to mentioned: Approved by: maintainer timeout (almost 2 months) > > Modified: > head/net/ifstated/Makefile > head/net/ifstated/files/patch-ifstated.c > head/net/ifstated/files/patch-log.c > > Modified: head/net/ifstated/Makefile > ============================================================================== > --- head/net/ifstated/Makefile Wed Dec 24 05:52:59 2014 (r375389) > +++ head/net/ifstated/Makefile Wed Dec 24 05:59:32 2014 (r375390) > @@ -3,7 +3,7 @@ > > PORTNAME= ifstated > PORTVERSION= 5.1 > -PORTEPOCH= 2 > +PORTEPOCH= 3 > CATEGORIES= net > MASTER_SITES= http://christianserving.org/ports/net/ifstated/ > > > Modified: head/net/ifstated/files/patch-ifstated.c > ============================================================================== > --- head/net/ifstated/files/patch-ifstated.c Wed Dec 24 05:52:59 2014 (r375389) > +++ head/net/ifstated/files/patch-ifstated.c Wed Dec 24 05:59:32 2014 (r375390) > @@ -1,5 +1,5 @@ > ---- ifstated.c.orig 2011-07-03 23:34:14.000000000 -0500 > -+++ ifstated.c 2012-03-23 14:32:56.412119431 -0500 > +--- ifstated.c.orig 2011-07-04 12:34:14.000000000 +0800 > ++++ ifstated.c 2014-12-05 15:10:34.000000000 +0800 > @@ -26,9 +26,11 @@ > #include > #include > @@ -104,7 +104,16 @@ > event_set(&rt_msg_ev, rt_fd, EV_READ|EV_PERSIST, rt_msg_handler, NULL); > event_add(&rt_msg_ev, NULL); > > -@@ -403,6 +424,7 @@ > +@@ -396,13 +417,15 @@ > + waitpid(external->pid, &s, 0); > + external->pid = 0; > + } > +- evtimer_del(&external->ev); > ++ if (event_initialized(&external->ev)) > ++ evtimer_del(&external->ev); > + } > + break; > + } > } > } > > @@ -112,7 +121,17 @@ > #define LINK_STATE_IS_DOWN(_s) (!LINK_STATE_IS_UP((_s))) > > int > -@@ -580,6 +602,44 @@ > +@@ -534,7 +557,8 @@ > + if (conf->nextstate != NULL && conf->curstate != conf->nextstate) { > + log_info("changing state to %s", conf->nextstate->name); > + if (conf->curstate != NULL) { > +- evtimer_del(&conf->curstate->ev); > ++ if (event_initialized (&conf->curstate->ev)) > ++ evtimer_del(&conf->curstate->ev); > + external_evtimer_setup(conf->curstate, > + IFSD_EVTIMER_DEL); > + } > +@@ -580,6 +604,44 @@ > } > } > > @@ -157,7 +176,7 @@ > /* > * Fetch the current link states. > */ > -@@ -589,26 +649,31 @@ > +@@ -589,26 +651,31 @@ > struct ifaddrs *ifap, *ifa; > char *oname = NULL; > int sock = socket(AF_INET, SOCK_DGRAM, 0); > @@ -197,7 +216,7 @@ > } > freeifaddrs(ifap); > close(sock); > -@@ -703,3 +768,13 @@ > +@@ -703,3 +770,13 @@ > } > free(expression); > } > > Modified: head/net/ifstated/files/patch-log.c > ============================================================================== > --- head/net/ifstated/files/patch-log.c Wed Dec 24 05:52:59 2014 (r375389) > +++ head/net/ifstated/files/patch-log.c Wed Dec 24 05:59:32 2014 (r375390) > @@ -1,6 +1,13 @@ > ---- log.c.orig 2010-06-11 13:29:09.127347360 -0500 > -+++ log.c 2010-06-11 13:29:20.636464838 -0500 > -@@ -28,8 +28,8 @@ > +--- log.c.orig 2007-10-25 14:03:31.000000000 +0800 > ++++ log.c 2014-12-05 15:11:31.000000000 +0800 > +@@ -22,14 +22,15 @@ > + #include > + #include > + #include > ++#include > + > + void log_init(int); > + void log_warn(const char *, ...); > void log_warnx(const char *, ...); > void log_info(const char *, ...); > void log_debug(const char *, ...); >