From 1cc9ff566043498978ba299455b2a9190b2d5119 Mon Sep 17 00:00:00 2001 From: Tobias Becker Date: Sun, 5 Sep 2004 22:04:57 +0000 Subject: [PATCH] =?UTF-8?q?New=20parameter=20file=20entry=20"ignoreUPD"=20?= =?UTF-8?q?for=20suppressing=20"Unexpected=20discrimator=20(...)"=20messag?= =?UTF-8?q?es,=20demanded=20by=20G=EF=BF=BDnther=20J.=20Niederwimmer=20on?= =?UTF-8?q?=20the=20suse-isdn=20mailing=20list.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- isdnlog/isdnlog/ChangeLog | 8 ++++++++ isdnlog/isdnlog/isdnlog.8.in | 8 ++++++++ isdnlog/isdnlog/isdnlog.c | 10 ++++++++++ isdnlog/isdnlog/isdnlog.h | 9 +++++++++ isdnlog/isdnlog/processor.c | 10 ++++++++-- isdnlog/tools/ChangeLog | 4 ++++ isdnlog/tools/tools.h | 5 +++++ 7 files changed, 52 insertions(+), 2 deletions(-) diff --git a/isdnlog/isdnlog/ChangeLog b/isdnlog/isdnlog/ChangeLog index 9ddfdfcf..61a9fd1d 100644 --- a/isdnlog/isdnlog/ChangeLog +++ b/isdnlog/isdnlog/ChangeLog @@ -1,3 +1,11 @@ +2004-09-05 Tobias Becker + + * isdnlog.h (ignore_unknown_PD): New global variable. + * isdnlog.c (read_param_file): Store ignoreUPD setting in parameter + file to ignore_unknown_PD. + * processor.c (processctrl): Show warning "Unexpected discriminator" + only if not suppressed by ignore_unknown_PD. + 2004-08-25 Tobias Becker * processor.c (processctrl): Removed declaration of moreinfo, it is diff --git a/isdnlog/isdnlog/isdnlog.8.in b/isdnlog/isdnlog/isdnlog.8.in index 75c243f5..8f348618 100644 --- a/isdnlog/isdnlog/isdnlog.8.in +++ b/isdnlog/isdnlog/isdnlog.8.in @@ -119,6 +119,14 @@ number that was dialled, and then the cost calculation would be wrong. .br With value 2 the ignored COLP number is displayed. +.TP +.B ignoreUPD={yes|no} +(There is no commandline option for this.) +A PABX may cause numerous messages +like "Unexpected discriminator 0x47 -- ignored!" resulting from +protocol discriminator values in layer 3 not known to isdnlog. +Set ignoreUPD to yes to suppress this messages. + .TP .B \-2\fIx\fB dual="value" Enable dual mode. You need this if you have a second isdn card attached with diff --git a/isdnlog/isdnlog/isdnlog.c b/isdnlog/isdnlog/isdnlog.c index 89f0f1f3..92a22528 100644 --- a/isdnlog/isdnlog/isdnlog.c +++ b/isdnlog/isdnlog/isdnlog.c @@ -19,6 +19,13 @@ * along with this program; if not, write to the Free Software * * $Log$ + * Revision 1.72 2004/01/28 14:27:46 tobiasb + * Second step in restricting fds at isdnlog restart and script starting. + * The fd limit is now taken from getrlimit() instead of NR_OPEN. + * Close_Fds(first) which tries to close all possible fds is generally + * built in but the execution must be requested with "closefds=yes" in + * the parameterfile otherwise the isdnlog behaviour remains unchanged. + * * Revision 1.71 2004/01/26 15:20:08 tobiasb * First step to close all unnecessary open file descriptors before * starting a start script as reaction to a call. The same applies to the @@ -1270,6 +1277,9 @@ static int read_param_file(char *FileName) else if (!strcmp(Ptr->name,CONF_ENT_CLOSEFDS)) param_closefds = toupper(*(Ptr->value)) == 'Y'?1:0; + else + if (!strcmp(Ptr->name,CONF_ENT_IGNOREUPD)) + ignore_unknown_PD = toupper(*(Ptr->value)) == 'Y'?1:0; else print_msg(PRT_ERR,"Error: Invalid entry `%s'!\n",Ptr->name); diff --git a/isdnlog/isdnlog/isdnlog.h b/isdnlog/isdnlog/isdnlog.h index 2258f632..db1c1d86 100644 --- a/isdnlog/isdnlog/isdnlog.h +++ b/isdnlog/isdnlog/isdnlog.h @@ -20,6 +20,13 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log$ + * Revision 1.28 2004/01/28 14:27:46 tobiasb + * Second step in restricting fds at isdnlog restart and script starting. + * The fd limit is now taken from getrlimit() instead of NR_OPEN. + * Close_Fds(first) which tries to close all possible fds is generally + * built in but the execution must be requested with "closefds=yes" in + * the parameterfile otherwise the isdnlog behaviour remains unchanged. + * * Revision 1.27 2004/01/26 15:20:08 tobiasb * First step to close all unnecessary open file descriptors before * starting a start script as reaction to a call. The same applies to the @@ -436,11 +443,13 @@ typedef struct _interval { #define _EXTERN socket_queue *sockets = NULL; _EXTERN int ignore_unknown_IE = 0xFE; /* codesets 7 to 1 */ +_EXTERN int ignore_unknown_PD = 0; _EXTERN int param_closefds = 0; #else #define _EXTERN extern extern socket_queue *sockets; _EXTERN int ignore_unknown_IE; +_EXTERN int ignore_unknown_PD; _EXTERN int param_closefds; #endif diff --git a/isdnlog/isdnlog/processor.c b/isdnlog/isdnlog/processor.c index f9a910aa..6cc3c427 100644 --- a/isdnlog/isdnlog/processor.c +++ b/isdnlog/isdnlog/processor.c @@ -19,6 +19,10 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log$ + * Revision 1.128 2004/08/25 21:22:06 tobiasb + * Minor fixes, required by gcc-3.4: Label at end of block, double function + * declaration. Revealed by Andreas Jochens as Debian bug #266523. + * * Revision 1.127 2003/10/29 17:41:34 tobiasb * isdnlog-4.67: * - Enhancements for isdnrep: @@ -4790,8 +4794,10 @@ static void processctrl(int card, char *s) return; default : version = VERSION_UNKNOWN; - sprintf(sx, "Unexpected discriminator 0x%02x -- ignored!", i); - info(chan, PRT_SHOWNUMBERS, STATE_RING, sx); + if (!ignore_unknown_PD) { + sprintf(sx, "Unexpected discriminator 0x%02x -- ignored!", i); + info(chan, PRT_SHOWNUMBERS, STATE_RING, sx); + } return; } /* switch */ diff --git a/isdnlog/tools/ChangeLog b/isdnlog/tools/ChangeLog index a0165017..5e6baaca 100644 --- a/isdnlog/tools/ChangeLog +++ b/isdnlog/tools/ChangeLog @@ -1,3 +1,7 @@ +2004-09-05 Tobias Becker + * tools.h (CONF_ENT_IGNOREUPD): New entry "IGNOREUPD" in parameter + file of isdnlog, entry name defined here. + 2004-08-25 Tobias Becker * rate.c (initRate, get_area1): Put a minimal statement after label diff --git a/isdnlog/tools/tools.h b/isdnlog/tools/tools.h index fcaf973a..9958f404 100644 --- a/isdnlog/tools/tools.h +++ b/isdnlog/tools/tools.h @@ -20,6 +20,10 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log$ + * Revision 1.61 2004/07/24 16:16:56 tobiasb + * New entry `REPOPTIONS' in section [ISDNLOG] of the isdn configuration + * file. This will be used for commandline options defaults of isdnrep. + * * Revision 1.60 2004/01/28 14:27:47 tobiasb * Second step in restricting fds at isdnlog restart and script starting. * The fd limit is now taken from getrlimit() instead of NR_OPEN. @@ -892,6 +896,7 @@ #define CONF_ENT_ABCLCR "ABCLCR" #define CONF_ENT_PROVIDERCHANGE "PROVIDERCHANGE" #define CONF_ENT_CLOSEFDS "CLOSEFDS" +#define CONF_ENT_IGNOREUPD "IGNOREUPD" /****************************************************************************/ /* Keywords for isdn.conf */