isdnctrl: added dialmode into the config file
This commit is contained in:
parent
32ac457147
commit
ebd18d8660
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ctrlconf.c,v 1.8 1998/03/20 07:52:13 calle Exp $
|
||||
/* $Id: ctrlconf.c,v 1.9 1998/11/21 14:03:31 luethje Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux. (Utilities)
|
||||
*
|
||||
|
@ -19,6 +19,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: ctrlconf.c,v $
|
||||
* Revision 1.9 1998/11/21 14:03:31 luethje
|
||||
* isdnctrl: added dialmode into the config file
|
||||
*
|
||||
* Revision 1.8 1998/03/20 07:52:13 calle
|
||||
* Allow readconf to read multilink configs with more than 2 channels.
|
||||
*
|
||||
|
@ -190,6 +193,11 @@ static char* readoptions(int fd, char *name, int is_master, section *CSec, secti
|
|||
if (Set_Entry(SubSec,interface,CONF_ENT_SECURE, cfg.secure?"on":"off", C_OVERWRITE | C_WARN) == NULL)
|
||||
return NULL;
|
||||
|
||||
#ifdef ISDN_NET_DM_OFF
|
||||
if (Set_Entry(SubSec,interface,CONF_ENT_DIALMODE, cfg.dialmode == ISDN_NET_DM_MANUAL?"manual":cfg.dialmode == ISDN_NET_DM_AUTO?"auto":"off", C_OVERWRITE | C_WARN) == NULL)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
if (cfg.callback)
|
||||
{
|
||||
if (Set_Entry(SubSec,interface,CONF_ENT_CALLBACK,num2callb[cfg.callback], C_OVERWRITE | C_WARN) == NULL)
|
||||
|
@ -390,6 +398,17 @@ int readconfig(int fd, char *file)
|
|||
exec_args(fd,3,argv);
|
||||
}
|
||||
else
|
||||
#ifdef ISDN_NET_DM_OFF
|
||||
if (!strcmp(Entry->name,CONF_ENT_DIALMODE))
|
||||
{
|
||||
argv[0] = cmds[DIALMODE].cmd;
|
||||
argv[1] = name;
|
||||
argv[2] = Entry->value;
|
||||
argv[3] = NULL;
|
||||
exec_args(fd,3,argv);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (!strcmp(Entry->name,CONF_ENT_CALLBACK))
|
||||
{
|
||||
argv[0] = cmds[CALLBACK].cmd;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ctrlconf.h,v 1.2 1997/06/26 21:25:15 luethje Exp $
|
||||
/* $Id: ctrlconf.h,v 1.3 1998/11/21 14:03:34 luethje Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux. (Utilities)
|
||||
*
|
||||
|
@ -19,6 +19,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: ctrlconf.h,v $
|
||||
* Revision 1.3 1998/11/21 14:03:34 luethje
|
||||
* isdnctrl: added dialmode into the config file
|
||||
*
|
||||
* Revision 1.2 1997/06/26 21:25:15 luethje
|
||||
* Added the trigger function to the config file.
|
||||
*
|
||||
|
@ -57,6 +60,7 @@
|
|||
#define CONF_ENT_TRIGGERCPS "TRIGGER"
|
||||
#define CONF_ENT_BIND "BIND"
|
||||
#define CONF_ENT_PPPBIND "PPPBIND"
|
||||
#define CONF_ENT_DIALMODE "DIALMODE"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: start_prog.c,v 1.12 1998/10/22 18:22:43 luethje Exp $
|
||||
/* $Id: start_prog.c,v 1.13 1998/11/21 14:03:39 luethje Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux.
|
||||
*
|
||||
|
@ -20,6 +20,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: start_prog.c,v $
|
||||
* Revision 1.13 1998/11/21 14:03:39 luethje
|
||||
* isdnctrl: added dialmode into the config file
|
||||
*
|
||||
* Revision 1.12 1998/10/22 18:22:43 luethje
|
||||
* isdnrep: suppress some messages
|
||||
* isdnlog: remove function Pathfind()
|
||||
|
@ -214,7 +217,7 @@ int Ring(info_args *Cmd, char *Opts[], int Die, int Async)
|
|||
|
||||
if (GetArgs(Command,Args,Opts,64) == -1)
|
||||
{
|
||||
print_msg(PRT_ERR, "Can't start \"%s\" with execvp().\n", Args[0]);
|
||||
print_msg(PRT_ERR, "Can't start \"%s\": Invalid arguments\n", Args[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -244,7 +247,7 @@ int Ring(info_args *Cmd, char *Opts[], int Die, int Async)
|
|||
|
||||
/* execvp(Pathfind(Args[0],NULL,NULL), Args);*/
|
||||
execvp(Args[0], Args);
|
||||
print_msg(PRT_ERR, "Can't start \"%s\" with execvp().\n", Args[0]);
|
||||
print_msg(PRT_ERR, "Can't start \"%s\" with execvp(): %s\n", Args[0],strerror(errno));
|
||||
/* Alarm(); */
|
||||
exit(-1);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue