From owner-freebsd-isdn Fri Jan 8 14:09:29 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA02345 for freebsd-isdn-outgoing; Fri, 8 Jan 1999 14:09:29 -0800 (PST) (envelope-from owner-freebsd-isdn@FreeBSD.ORG) Received: from scottb.demon.co.uk (scottb.demon.co.uk [158.152.42.64]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA02339 for ; Fri, 8 Jan 1999 14:09:26 -0800 (PST) (envelope-from barry@scottb.demon.co.uk) Received: from barrynt (barrynt.private [172.16.1.6]) by scottb.demon.co.uk (8.8.8/8.8.8) with SMTP id WAA00533 for ; Fri, 8 Jan 1999 22:08:04 GMT (envelope-from barry@scottb.demon.co.uk) From: "Barry Scott" To: "Freebsd-Isdn@Freebsd. Org" Subject: How do I submit my code changes? Date: Fri, 8 Jan 1999 22:03:54 -0000 Message-ID: <000101be3b52$c86ee360$060110ac@barrynt.private> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2232.26 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I have the U.K billing modifications designed, implemented and debugged. I am using the code in production now. What do need to do to submit the code? What documentation is required? Should I be adding copyright to the code I have added? Below is an overview of the changes. BArry Here is an overview of the changes. --------- Fix rates.h/rates.c. Two bugs found: 1) only hour field used to select a rate. 2) a range like 18.00 to 00.00 does not work. To fix (1) store time as minutes since midnight not hour and minute values. To fix (2) convert 00.00 to 24.00 so end_time is greater then the start_time. Added an extra check to the parsing code end_time must be after start_time. ------------ Added an enum to enumerate all the shorthold algorithms to be used. Placed all the shorthold data into a shorthold data struct. Embed that struct everywhere shorthold data is used. e.g. the driver, layer4 and isdnd. The algorithm is set by a tag in the isdnd.rc file. add switch on the algorithm to call out to algorithm unique code. There are two switches. (1) for idle time setup and (2) for idle time checking. All the old shorthold code has been moved asis into a setup, check routines. I call the old algorithm "fixed unit" and the new algorithm "variable unit". (I'm sure that better names can and should be found.) The variable unit algorithm work as follows. Wait for the first unit to nearly expire. Nearly being 1 second before the end of the unit. Then check for the link being idle for idletime seconds once a second. The reason for starting to check 1 second before the end of the unit is because the drivers timing is rounded to second granularity in many places and I do not wish to go over the one unit before checking for an idle link. --------------- Suggestion rename the symbol SECOND to be less confusing. Try SYS_TIME_SECONDS or CUR_TIME_SECONDS. In english SECOND is a great name for a symbol that represents an interval of one second. --------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message