From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Apr 2 10:00:19 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27F6716A402 for ; Mon, 2 Apr 2007 10:00:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 187D713C46C for ; Mon, 2 Apr 2007 10:00:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l32A0I13047497 for ; Mon, 2 Apr 2007 10:00:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l32A0IvR047496; Mon, 2 Apr 2007 10:00:18 GMT (envelope-from gnats) Date: Mon, 2 Apr 2007 10:00:18 GMT Message-Id: <200704021000.l32A0IvR047496@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: linimon@lonesome.com (Mark Linimon) Cc: Subject: Re: ports/111129: [patch] ports/net/ifstated X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mark Linimon List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2007 10:00:19 -0000 The following reply was made to PR ports/111129; it has been noted by GNATS. From: linimon@lonesome.com (Mark Linimon) To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: ports/111129: [patch] ports/net/ifstated Date: Mon, 2 Apr 2007 04:50:40 -0500 Forwarding patch from email directly to me. On Mon, Apr 02, 2007 at 01:20:55PM +0400, Artemiev Igor wrote: > > -- > iprefetch ai > --- ifstated.c.orig Mon Apr 2 11:38:09 2007 > +++ ifstated.c Mon Apr 2 11:44:01 2007 > @@ -49,6 +49,8 @@ > > #include "ifstated.h" > > +#define MAX_TIMERS 100 > + > struct ifsd_config *conf = NULL, *newconf = NULL; > > int opts = 0; > @@ -168,7 +170,7 @@ > rt_handler = kev.udata; > rt_handler(kev.ident); > } > - else if ((kev.filter == EVFILT_TIMER) && (kev.ident == IFSD_EVTIMER_EXTERNAL)) > + else if ((kev.filter == EVFILT_TIMER) && ((kev.ident - IFSD_EVTIMER_EXTERNAL) < MAX_TIMERS)) > { > external_async_exec((struct ifsd_external *)kev.udata); > } > @@ -374,6 +376,7 @@ > struct ifsd_external *external; > struct timespec ts; > int freq; > + int imod = 0; > > ts.tv_nsec = 0; > ts.tv_sec = 0; > @@ -389,8 +392,10 @@ > > /* schedule it for later */ > freq = (external->frequency * 1000); > - EV_SET(&kev, IFSD_EVTIMER_EXTERNAL, EVFILT_TIMER, EV_ADD, 0, freq, (void *)external); > + EV_SET(&kev, IFSD_EVTIMER_EXTERNAL + imod, EVFILT_TIMER, EV_ADD, 0, freq, (void *)external); > kevent(kq, &kev, 1, NULL, 0, &ts); > + imod ++; > + if(imod >= MAX_TIMERS) imod = 0; > } > break; > case IFSD_EVTIMER_DEL: > @@ -401,7 +406,9 @@ > external->pid = 0; > } > freq = (external->frequency * 1000); > - EV_SET(&kev, IFSD_EVTIMER_EXTERNAL, EVFILT_TIMER, EV_DELETE, 0, freq, (void *)external); > + EV_SET(&kev, IFSD_EVTIMER_EXTERNAL + imod, EVFILT_TIMER, EV_DELETE, 0, freq, (void *)external); > + imod ++; > + if(imod < MAX_TIMERS) > kevent(kq, &kev, 1, NULL, 0, &ts); > } > break;