some bugfixes.
This commit is contained in:
parent
0470bc659c
commit
db2d57a0f8
|
@ -1,8 +1,9 @@
|
|||
/* $Id: isdnconf.c,v 1.1 1997/03/16 20:59:22 luethje Exp $
|
||||
/* $Id: isdnconf.c,v 1.2 1997/04/03 22:40:19 luethje Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux. (Utilities)
|
||||
*
|
||||
* Copyright 1995, 1997 by Andreas Kool (akool@Kool.f.EUnet.de)
|
||||
* and Stefan Luethje (luethje@sl-gw.lake.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -901,6 +902,7 @@ static int _readconfig(char *_myname)
|
|||
reloadcmd = RELOADCMD;
|
||||
stopcmd = STOPCMD;
|
||||
rebootcmd = REBOOTCMD;
|
||||
logfile = LOGFILE;
|
||||
start_procs.infoargs = NULL;
|
||||
start_procs.flags = 0;
|
||||
conf_dat = NULL;
|
||||
|
@ -942,17 +944,6 @@ static int Set_Globals(section *SPtr)
|
|||
auto entry *CEPtr;
|
||||
|
||||
|
||||
if ((Ptr = Get_Section(SPtr,CONF_SEC_GLOBAL)) != NULL)
|
||||
{
|
||||
if ((CEPtr = Get_Entry(Ptr->entries,CONF_ENT_AREA)) != NULL && CEPtr->value != NULL)
|
||||
myarea = CEPtr->value;
|
||||
|
||||
if ((CEPtr = Get_Entry(Ptr->entries,CONF_ENT_COUNTRY)) != NULL && CEPtr->value != NULL)
|
||||
mycountry = CEPtr->value;
|
||||
}
|
||||
else
|
||||
_print_msg("%s: WARNING: There is no section `%s'!\n", Myname, CONF_SEC_GLOBAL);
|
||||
|
||||
if ((Ptr = Get_Section(SPtr,CONF_SEC_ISDNLOG)) != NULL)
|
||||
{
|
||||
if ((CEPtr = Get_Entry(Ptr->entries,CONF_ENT_ILABEL)) != NULL)
|
||||
|
@ -977,6 +968,9 @@ static int Set_Globals(section *SPtr)
|
|||
if ((CEPtr = Get_Entry(Ptr->entries,CONF_ENT_REBOOT)) != NULL)
|
||||
rebootcmd = CEPtr->value;
|
||||
|
||||
if ((CEPtr = Get_Entry(Ptr->entries,CONF_ENT_LOGFILE)) != NULL)
|
||||
logfile = CEPtr->value;
|
||||
|
||||
if ((CEPtr = Get_Entry(Ptr->entries,CONF_ENT_CHARGE)) != NULL)
|
||||
chargemax = strtod(CEPtr->value,NULL);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: tools.c,v 1.3 1997/03/31 22:15:32 akool Exp $
|
||||
/* $Id: tools.c,v 1.4 1997/04/03 22:40:21 luethje Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux. (Utilities)
|
||||
*
|
||||
|
@ -19,6 +19,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: tools.c,v $
|
||||
* Revision 1.4 1997/04/03 22:40:21 luethje
|
||||
* some bugfixes.
|
||||
*
|
||||
* Revision 1.3 1997/03/31 22:15:32 akool
|
||||
* added support for the new glibc 2.0.x (aka libc 6.0)
|
||||
* changed "HOWTO" to reflect the current stage of development
|
||||
|
@ -514,6 +517,7 @@ static char *itoa(register unsigned int num, register char *p, register int radi
|
|||
|
||||
/****************************************************************************/
|
||||
|
||||
/*
|
||||
static char *ltoa(register unsigned long num, register char *p, register int radix, int dots)
|
||||
{
|
||||
register int i, j = 0;
|
||||
|
@ -545,7 +549,8 @@ static char *ltoa(register unsigned long num, register char *p, register int rad
|
|||
while (--i);
|
||||
|
||||
return(p);
|
||||
} /* ltoa */
|
||||
}
|
||||
*/
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
/* $Id: tools.h,v 1.8 1997/03/31 22:43:18 luethje Exp $
|
||||
/* $Id: tools.h,v 1.9 1997/04/03 22:40:21 luethje Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux.
|
||||
*
|
||||
* Copyright 1995, 1997 by Andreas Kool (akool@Kool.f.EUnet.de)
|
||||
* and Stefan Luethje (luethje@sl-gw.lake.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -19,6 +20,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: tools.h,v $
|
||||
* Revision 1.9 1997/04/03 22:40:21 luethje
|
||||
* some bugfixes.
|
||||
*
|
||||
* Revision 1.8 1997/03/31 22:43:18 luethje
|
||||
* Improved performance of the isdnrep, made some changes of README
|
||||
*
|
||||
|
@ -160,6 +164,10 @@
|
|||
# define REBOOTCMD "/sbin/reboot"
|
||||
#endif
|
||||
|
||||
#ifndef LOGFILE
|
||||
# define LOGFILE "/sbin/reboot"
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#define LOG_VERSION "3.0"
|
||||
|
@ -360,6 +368,7 @@
|
|||
#define CONF_ENT_RELOAD "RELOADCMD"
|
||||
#define CONF_ENT_STOP "STOPCMD"
|
||||
#define CONF_ENT_REBOOT "REBOOTCMD"
|
||||
#define CONF_ENT_LOGFILE "LOGFILE"
|
||||
|
||||
#define CONF_SEC_START "START"
|
||||
#define CONF_SEC_FLAG "FLAG"
|
||||
|
@ -598,6 +607,7 @@ extern char *optarg;
|
|||
_EXTERN char* reloadcmd = RELOADCMD;
|
||||
_EXTERN char* stopcmd = STOPCMD;
|
||||
_EXTERN char* rebootcmd = REBOOTCMD;
|
||||
_EXTERN char* logfile = LOGFILE;
|
||||
_EXTERN int (*_print_msg)(const char *, ...) = printf;
|
||||
_EXTERN int use_new_config = 1;
|
||||
|
||||
|
@ -607,6 +617,7 @@ _EXTERN int use_new_config = 1;
|
|||
_EXTERN char* reloadcmd;
|
||||
_EXTERN char* stopcmd;
|
||||
_EXTERN char* rebootcmd;
|
||||
_EXTERN char* logfile;
|
||||
_EXTERN int (*_print_msg)(const char *, ...);
|
||||
_EXTERN int use_new_config;
|
||||
|
||||
|
|
Loading…
Reference in New Issue