diff --git a/Makefile b/Makefile index 5bfcc47b..217d921c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.46 2000/06/20 12:51:56 paul Exp $ +# $Id: Makefile,v 1.47 2000/08/14 18:41:42 akool Exp $ # # Toplevel Makefile for isdn4k-utils # @@ -24,7 +24,7 @@ CONFIGURATION = config do-it-all: config endif -EXTRADIRS = isdnlog/tools/zone isdnlog/tools/dest +EXTRADIRS = isdnlog/tools/zone isdnlog/tools/dest isdnlog/tools/cdb SUBDIRS := ifeq ($(CONFIG_ISDNLOG),y) diff --git a/isdnlog/Makefile.in b/isdnlog/Makefile.in index 0bb78ba8..9cc55782 100644 --- a/isdnlog/Makefile.in +++ b/isdnlog/Makefile.in @@ -1,4 +1,4 @@ -## $Id: Makefile.in,v 1.177 2000/08/06 13:06:52 akool Exp $ +## $Id: Makefile.in,v 1.178 2000/08/14 18:41:43 akool Exp $ ## ## ISDN accounting for isdn4linux. ## @@ -19,6 +19,11 @@ ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ## ## $Log: Makefile.in,v $ +## Revision 1.178 2000/08/14 18:41:43 akool +## isdnlog-4.39 +## - fixed 2 segfaults in processor.c +## - replaced non-GPL "cdb" with "freecdb_0.61.tar.gz" +## ## Revision 1.177 2000/08/06 13:06:52 akool ## isdnlog-4.38 ## - isdnlog now uses ioctl(IIOCNETGPN) to associate phone numbers, interfaces @@ -1352,7 +1357,7 @@ SERVICEFILE = /etc/services # DON'T EDIT BELOW THIS LINE ###################################################################### -VERSION = 4.38 +VERSION = 4.39 MANPAGES = isdnlog/callerid.conf.5 isdnlog/isdn.conf.5 \ isdnlog/isdnformat.5 isdnlog/isdnlog.5 isdnlog/isdnlog.8 \ diff --git a/isdnlog/configure b/isdnlog/configure index e997f115..f844f535 100755 --- a/isdnlog/configure +++ b/isdnlog/configure @@ -1081,7 +1081,7 @@ if test -e tools/cdb/i4l_cdb.c ; then #define USE_CDB 1 EOF - CDBEXTRALIBS="tools/cdb/i4l_cdb.a tools/cdb/cdb.a tools/cdb/buffer.a tools/cdb/unix.a tools/cdb/byte.a tools/cdb/alloc.a" + CDBEXTRALIBS="tools/cdb/i4l_cdb.a" DBEXT=".cdb" RDBEXT=".cdb" echo "$ac_t""Using 'cdb' as database" 1>&6 diff --git a/isdnlog/configure.in b/isdnlog/configure.in index bc411737..0b6b4639 100644 --- a/isdnlog/configure.in +++ b/isdnlog/configure.in @@ -130,7 +130,7 @@ AC_PATH_PROGS(BZIP2, bzip2, /usr/bin/bzip2, $PATH:/bin:/usr/bin:/usr/local/bin) dnl Checks for libraries. if test -e tools/cdb/i4l_cdb.c ; then AC_DEFINE(USE_CDB) - CDBEXTRALIBS="tools/cdb/i4l_cdb.a tools/cdb/cdb.a tools/cdb/buffer.a tools/cdb/unix.a tools/cdb/byte.a tools/cdb/alloc.a" + CDBEXTRALIBS="tools/cdb/i4l_cdb.a" DBEXT=".cdb" RDBEXT=".cdb" AC_MSG_RESULT(Using 'cdb' as database) diff --git a/isdnlog/isdnlog/processor.c b/isdnlog/isdnlog/processor.c index efe45cd8..7350a0e5 100644 --- a/isdnlog/isdnlog/processor.c +++ b/isdnlog/isdnlog/processor.c @@ -1,4 +1,4 @@ -/* $Id: processor.c,v 1.111 2000/08/06 13:06:53 akool Exp $ +/* $Id: processor.c,v 1.112 2000/08/14 18:41:43 akool Exp $ * * ISDN accounting for isdn4linux. (log-module) * @@ -19,6 +19,11 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: processor.c,v $ + * Revision 1.112 2000/08/14 18:41:43 akool + * isdnlog-4.39 + * - fixed 2 segfaults in processor.c + * - replaced non-GPL "cdb" with "freecdb_0.61.tar.gz" + * * Revision 1.111 2000/08/06 13:06:53 akool * isdnlog-4.38 * - isdnlog now uses ioctl(IIOCNETGPN) to associate phone numbers, interfaces @@ -3588,11 +3593,6 @@ static void processinfo(char *s) else print_msg(PRT_NORMAL, "(watching \"%s\" and \"%s\")\n", isdnctrl, isdnctrl2); } /* if */ - - if (IIOCNETGPNavailable) - print_msg(PRT_NORMAL, "Everything is fine, isdnlog-%s is running in full featured mode.\n", VERSION); - else - print_msg(PRT_NORMAL, "HINT: Please upgrade to Linux-2.2.12 or higher for all features of isdnlog-%s\n", VERSION); } /* if */ /* @@ -3601,7 +3601,7 @@ static void processinfo(char *s) * Letzte Version davor war "ISDN subsystem Rev: 1.18/1.18/1.13/1.9/1.6" */ - if (!replay) + if (!replay) { if ((version = ioctl(sockets[ISDNINFO].descriptor, IIOCGETDVR)) != -EINVAL) { #ifdef NET_DV int my_net_dv = NET_DV; @@ -3616,19 +3616,26 @@ static void processinfo(char *s) inf_dv = version & 0xff; print_msg(PRT_NORMAL, "(Data versions: iprofd=0x%02x net_cfg=0x%02x /dev/isdninfo=0x%02x)\n", tty_dv, net_dv, inf_dv); + if (/* Abort if kernel version is greater, since struct has probably * become larger and would overwrite our stack */ net_dv > my_net_dv || /* version 0x03 is special, because it changed a field in the * middle of the struct and thus is compatible only to itself */ ((my_net_dv == 0x03 || net_dv == 0x03) && my_net_dv != net_dv)) { - print_msg(PRT_ERR, "isdn_net_ioctl_cfg version mismatch " - "(kernel 0x%02x, isdnlog 0x%02x)\n", + print_msg(PRT_ERR, "FATAL: isdn_net_ioctl_cfg version mismatch " + "(kernel 0x%02x, isdnlog 0x%02x). Please upgrade your Linux-Kernel and/or your I4L-utils.\n", net_dv, my_net_dv); Exit(99); - } + } /* if */ } /* if */ + if (IIOCNETGPNavailable) + print_msg(PRT_NORMAL, "Everything is fine, isdnlog-%s is running in full featured mode.\n", VERSION); + else + print_msg(PRT_NORMAL, "HINT: Please upgrade to Linux-2.2.12 or higher for all features of isdnlog-%s\n", VERSION); + } /* if */ + if (chans > 2) /* coming soon ;-) */ chans = 2; } /* if */ @@ -3897,7 +3904,9 @@ void processRate(int chan) call[chan].Rate.start = call[chan].connect; call[chan].Rate.now = call[chan].disconnect = cur_time; - if (getRate(&call[chan].Rate, NULL) == UNKNOWN) + if (call[chan].Rate.prefix == UNKNOWN) + call[chan].tarifknown = 0; + else if (getRate(&call[chan].Rate, NULL) == UNKNOWN) call[chan].tarifknown = 0; else { call[chan].tarifknown = 1; @@ -4047,6 +4056,9 @@ static void prepareRate(int chan, char **msg, char **tip, int viarep) call[chan].Rate.dst[2] = call[chan].rufnummer[CALLED]; } /* else */ + if (call[chan].provider == UNKNOWN) + return; + if (getRate(&call[chan].Rate, msg) == UNKNOWN) return; diff --git a/isdnlog/tools/NEWS b/isdnlog/tools/NEWS index 2494a318..2c7f96c6 100644 --- a/isdnlog/tools/NEWS +++ b/isdnlog/tools/NEWS @@ -1,5 +1,9 @@ NEWS for tools: (rate, isdnrate, isdnrep) +2000.08.09 + Reimplemted cdb based on the free cdb_0.61 from debian + -lt + 2000.07.27 The isdnlog/rep/rate have now a new default database. It is cdb diff --git a/isdnlog/tools/dest/configure b/isdnlog/tools/dest/configure index 0448c6c5..1b6d9a7a 100755 --- a/isdnlog/tools/dest/configure +++ b/isdnlog/tools/dest/configure @@ -816,7 +816,7 @@ if test -e ../cdb/i4l_cdb.c ; then #define USE_CDB 1 EOF - CDBEXTRALIBS="../cdb/i4l_cdb.a ../cdb/cdb.a ../cdb/buffer.a ../cdb/unix.a ../cdb/byte.a ../cdb/alloc.a" + CDBEXTRALIBS="../cdb/i4l_cdb.a" DBEXT=".cdb" RDBEXT=".cdb" echo "$ac_t""Using 'cdb' as database" 1>&6 diff --git a/isdnlog/tools/dest/configure.in b/isdnlog/tools/dest/configure.in index d29828d4..5e60f135 100644 --- a/isdnlog/tools/dest/configure.in +++ b/isdnlog/tools/dest/configure.in @@ -15,7 +15,7 @@ fi if test -e ../cdb/i4l_cdb.c ; then AC_DEFINE(USE_CDB) - CDBEXTRALIBS="../cdb/i4l_cdb.a ../cdb/cdb.a ../cdb/buffer.a ../cdb/unix.a ../cdb/byte.a ../cdb/alloc.a" + CDBEXTRALIBS="../cdb/i4l_cdb.a" DBEXT=".cdb" RDBEXT=".cdb" AC_MSG_RESULT(Using 'cdb' as database) diff --git a/isdnlog/tools/zone/Makefile.in b/isdnlog/tools/zone/Makefile.in index 910e2292..d411f2c7 100644 --- a/isdnlog/tools/zone/Makefile.in +++ b/isdnlog/tools/zone/Makefile.in @@ -97,7 +97,7 @@ clean: fi dataclean: clean - rm -f *.db *.gdbm ../../zone*.{gdbm,db,cdb} + rm -f *.db *.gdbm *.cdb ../../zone*.{gdbm,db,cdb} distclean: clean rm -f config.h config.status config.cache config.log *.man Makefile @@ -105,9 +105,9 @@ distclean: clean $(MAKE) -C ../cdb distclean ; \ fi -test: - $(BZIP2) -d at/pta/zred.pta.bz2 - $(BZIP2) -d at/pta/zoneall.pta.bz2 +test: zone mkzonedb + -$(BZIP2) -d at/pta/zred.pta.bz2 + -$(BZIP2) -d at/pta/zoneall.pta.bz2 ./$(PROGRAM) -d zone-at-pta$(DBEXT) -r at/pta/zred.pta -v ./zone -d zone-at-pta$(RDBEXT) -z at/pta/zoneall.pta -v $(BZIP2) -9 at/pta/zred.pta diff --git a/isdnlog/tools/zone/configure b/isdnlog/tools/zone/configure index 97569894..a18e73ee 100755 --- a/isdnlog/tools/zone/configure +++ b/isdnlog/tools/zone/configure @@ -817,7 +817,7 @@ if test -e ../cdb/i4l_cdb.c ; then #define USE_CDB 1 EOF - CDBEXTRALIBS="../cdb/i4l_cdb.a ../cdb/cdb.a ../cdb/buffer.a ../cdb/unix.a ../cdb/byte.a ../cdb/alloc.a" + CDBEXTRALIBS="../cdb/i4l_cdb.a" DBEXT=".cdb" RDBEXT=".cdb" echo "$ac_t""Using 'cdb' as database" 1>&6 diff --git a/isdnlog/tools/zone/configure.in b/isdnlog/tools/zone/configure.in index 8be5a754..69a3108e 100644 --- a/isdnlog/tools/zone/configure.in +++ b/isdnlog/tools/zone/configure.in @@ -16,7 +16,7 @@ fi if test -e ../cdb/i4l_cdb.c ; then AC_DEFINE(USE_CDB) - CDBEXTRALIBS="../cdb/i4l_cdb.a ../cdb/cdb.a ../cdb/buffer.a ../cdb/unix.a ../cdb/byte.a ../cdb/alloc.a" + CDBEXTRALIBS="../cdb/i4l_cdb.a" DBEXT=".cdb" RDBEXT=".cdb" AC_MSG_RESULT(Using 'cdb' as database)