summaryrefslogtreecommitdiffstats
path: root/usr.sbin/i4b
diff options
context:
space:
mode:
authorhm <hm@FreeBSD.org>2006-05-13 12:42:55 +0000
committerhm <hm@FreeBSD.org>2006-05-13 12:42:55 +0000
commit70fbb7249a34423afbf99a4c568fe5e6324381f6 (patch)
treea94a656ab7c01fe4deef16ddb42d006170e7314b /usr.sbin/i4b
parentb20e6373761b68d6ef414f863fcfca323df30e17 (diff)
downloadFreeBSD-src-70fbb7249a34423afbf99a4c568fe5e6324381f6.zip
FreeBSD-src-70fbb7249a34423afbf99a4c568fe5e6324381f6.tar.gz
fix conflicting types for log(), add some prototypes to isdnd.h
Diffstat (limited to 'usr.sbin/i4b')
-rw-r--r--usr.sbin/i4b/isdnd/alias.c10
-rw-r--r--usr.sbin/i4b/isdnd/controller.c80
-rw-r--r--usr.sbin/i4b/isdnd/curses.c20
-rw-r--r--usr.sbin/i4b/isdnd/dial.c22
-rw-r--r--usr.sbin/i4b/isdnd/exec.c36
-rw-r--r--usr.sbin/i4b/isdnd/fsm.c54
-rw-r--r--usr.sbin/i4b/isdnd/holiday.c16
-rw-r--r--usr.sbin/i4b/isdnd/isdnd.h6
-rw-r--r--usr.sbin/i4b/isdnd/log.c6
-rw-r--r--usr.sbin/i4b/isdnd/main.c48
-rw-r--r--usr.sbin/i4b/isdnd/monitor.c54
-rw-r--r--usr.sbin/i4b/isdnd/msghdl.c166
-rw-r--r--usr.sbin/i4b/isdnd/process.c34
-rw-r--r--usr.sbin/i4b/isdnd/rates.c28
-rw-r--r--usr.sbin/i4b/isdnd/rc_config.c300
-rw-r--r--usr.sbin/i4b/isdnd/support.c158
-rw-r--r--usr.sbin/i4b/isdnd/timer.c54
17 files changed, 547 insertions, 545 deletions
diff --git a/usr.sbin/i4b/isdnd/alias.c b/usr.sbin/i4b/isdnd/alias.c
index a775fc9..f91a0a1 100644
--- a/usr.sbin/i4b/isdnd/alias.c
+++ b/usr.sbin/i4b/isdnd/alias.c
@@ -34,7 +34,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Mon Dec 13 21:45:19 1999]
+ * last edit-date: [Sat May 13 13:04:40 2006]
*
*----------------------------------------------------------------------------*/
@@ -64,7 +64,7 @@ init_alias(char *filename)
if((fp = fopen(filename, "r")) == NULL)
{
- log(LL_ERR, "init_alias: error opening aliasfile %s: %s!", filename, strerror(errno));
+ llog(LL_ERR, "init_alias: error opening aliasfile %s: %s!", filename, strerror(errno));
exit(1);
}
@@ -98,19 +98,19 @@ init_alias(char *filename)
{
if((newa = (struct alias *) malloc(sizeof(struct alias))) == NULL)
{
- log(LL_ERR, "init_alias: malloc failed for struct alias!\n");
+ llog(LL_ERR, "init_alias: malloc failed for struct alias!\n");
exit(1);
}
if((newa->number = (char *) malloc(strlen(number)+1)) == NULL)
{
- log(LL_ERR, "init_alias: malloc failed for number alias!\n");
+ llog(LL_ERR, "init_alias: malloc failed for number alias!\n");
exit(1);
}
if((newa->name = (char *) malloc(strlen(name)+1)) == NULL)
{
- log(LL_ERR, "init_alias: malloc failed for name alias!\n");
+ llog(LL_ERR, "init_alias: malloc failed for name alias!\n");
exit(1);
}
diff --git a/usr.sbin/i4b/isdnd/controller.c b/usr.sbin/i4b/isdnd/controller.c
index 16a60c8..f9290bf 100644
--- a/usr.sbin/i4b/isdnd/controller.c
+++ b/usr.sbin/i4b/isdnd/controller.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Sun Oct 21 11:02:15 2001]
+ * last edit-date: [Sat May 13 13:24:05 2006]
*
*---------------------------------------------------------------------------*/
@@ -137,19 +137,19 @@ init_controller(void)
if((ioctl(isdnfd, I4B_CTRL_INFO_REQ, &mcir)) < 0)
{
- log(LL_ERR, "init_controller: ioctl I4B_CTRL_INFO_REQ failed: %s", strerror(errno));
+ llog(LL_ERR, "init_controller: ioctl I4B_CTRL_INFO_REQ failed: %s", strerror(errno));
do_exit(1);
}
if((ncontroller = max = mcir.ncontroller) == 0)
{
- log(LL_ERR, "init_controller: no ISDN controller found!");
+ llog(LL_ERR, "init_controller: no ISDN controller found!");
do_exit(1);
}
if(mcir.ctrl_type == -1 || mcir.card_type == -1)
{
- log(LL_ERR, "init_controller: ctrl/card is invalid!");
+ llog(LL_ERR, "init_controller: ctrl/card is invalid!");
do_exit(1);
}
@@ -157,11 +157,11 @@ init_controller(void)
if((init_controller_state(i, mcir.ctrl_type, mcir.card_type, mcir.tei, mcir.nbch)) == ERROR)
{
- log(LL_ERR, "init_controller: init_controller_state for controller %d failed", i);
+ llog(LL_ERR, "init_controller: init_controller_state for controller %d failed", i);
do_exit(1);
}
}
- DBGL(DL_RCCF, (log(LL_DBG, "init_controller: found %d ISDN controller(s)", max)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "init_controller: found %d ISDN controller(s)", max)));
}
/*--------------------------------------------------------------------------*
@@ -175,7 +175,7 @@ init_controller_state(int controller, int ctrl_type, int card_type, int tei,
if((controller < 0) || (controller >= ncontroller))
{
- log(LL_ERR, "init_controller_state: invalid controller number [%d]!", controller);
+ llog(LL_ERR, "init_controller_state: invalid controller number [%d]!", controller);
return(ERROR);
}
@@ -192,7 +192,7 @@ init_controller_state(int controller, int ctrl_type, int card_type, int tei,
}
else
{
- log(LL_ERR, "init_controller_state: unknown card type %d", card_type);
+ llog(LL_ERR, "init_controller_state: unknown card type %d", card_type);
return(ERROR);
}
break;
@@ -216,7 +216,7 @@ init_controller_state(int controller, int ctrl_type, int card_type, int tei,
break;
default:
- log(LL_ERR, "init_controller_state: unknown controller type %d", ctrl_type);
+ llog(LL_ERR, "init_controller_state: unknown controller type %d", ctrl_type);
return(ERROR);
}
@@ -228,7 +228,7 @@ init_controller_state(int controller, int ctrl_type, int card_type, int tei,
isdn_ctrl_tab[controller].l1stat = LAYER_IDLE;
isdn_ctrl_tab[controller].l2stat = LAYER_IDLE;
- log(LL_DMN, "init_controller_state: controller %d is %s",
+ llog(LL_DMN, "init_controller_state: controller %d is %s",
controller,
name_of_controller(isdn_ctrl_tab[controller].ctrl_type,
isdn_ctrl_tab[controller].card_type));
@@ -251,13 +251,13 @@ init_active_controller(void)
{
if(isdn_ctrl_tab[controller].ctrl_type == CTRL_TINADD)
{
- DBGL(DL_RCCF, (log(LL_DBG, "init_active_controller, tina-dd %d: executing [%s %d]", unit, tinainitprog, unit)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "init_active_controller, tina-dd %d: executing [%s %d]", unit, tinainitprog, unit)));
snprintf(cmdbuf, sizeof(cmdbuf), "%s %d", tinainitprog, unit);
if((ret = system(cmdbuf)) != 0)
{
- log(LL_ERR, "init_active_controller, tina-dd %d: %s returned %d!", unit, tinainitprog, ret);
+ llog(LL_ERR, "init_active_controller, tina-dd %d: %s returned %d!", unit, tinainitprog, ret);
do_exit(1);
}
}
@@ -276,7 +276,7 @@ init_active_controller(void)
fd = open(isdn_ctrl_tab[controller].firmware, O_RDONLY);
if (fd < 0) {
- log(LL_ERR, "init_active_controller %d: open %s: %s!",
+ llog(LL_ERR, "init_active_controller %d: open %s: %s!",
controller, isdn_ctrl_tab[controller].firmware,
strerror(errno));
do_exit(1);
@@ -286,13 +286,13 @@ init_active_controller(void)
idp.microcode = mmap(0, idp.bytecount, PROT_READ,
MAP_SHARED, fd, 0);
if (idp.microcode == MAP_FAILED) {
- log(LL_ERR, "init_active_controller %d: mmap %s: %s!",
+ llog(LL_ERR, "init_active_controller %d: mmap %s: %s!",
controller, isdn_ctrl_tab[controller].firmware,
strerror(errno));
do_exit(1);
}
- DBGL(DL_RCCF, (log(LL_DBG, "init_active_controller %d: loading firmware from [%s]", controller, isdn_ctrl_tab[controller].firmware)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "init_active_controller %d: loading firmware from [%s]", controller, isdn_ctrl_tab[controller].firmware)));
idr.controller = controller;
idr.numprotos = 1;
@@ -300,7 +300,7 @@ init_active_controller(void)
ret = ioctl(isdnfd, I4B_CTRL_DOWNLOAD, &idr, sizeof(idr));
if (ret) {
- log(LL_ERR, "init_active_controller %d: load %s: %s!",
+ llog(LL_ERR, "init_active_controller %d: load %s: %s!",
controller, isdn_ctrl_tab[controller].firmware,
strerror(errno));
do_exit(1);
@@ -328,7 +328,7 @@ init_controller_protocol(void)
if((ioctl(isdnfd, I4B_PROT_IND, &mpi)) < 0)
{
- log(LL_ERR, "init_controller_protocol: ioctl I4B_PROT_IND failed: %s", strerror(errno));
+ llog(LL_ERR, "init_controller_protocol: ioctl I4B_PROT_IND failed: %s", strerror(errno));
do_exit(1);
}
}
@@ -342,23 +342,23 @@ set_controller_state(int controller, int state)
{
if((controller < 0) || (controller >= ncontroller))
{
- log(LL_ERR, "set_controller_state: invalid controller number [%d]!", controller);
+ llog(LL_ERR, "set_controller_state: invalid controller number [%d]!", controller);
return(ERROR);
}
if(state == CTRL_UP)
{
isdn_ctrl_tab[controller].state = CTRL_UP;
- DBGL(DL_CNST, (log(LL_DBG, "set_controller_state: controller [%d] set UP!", controller)));
+ DBGL(DL_CNST, (llog(LL_DBG, "set_controller_state: controller [%d] set UP!", controller)));
}
else if (state == CTRL_DOWN)
{
isdn_ctrl_tab[controller].state = CTRL_DOWN;
- DBGL(DL_CNST, (log(LL_DBG, "set_controller_state: controller [%d] set DOWN!", controller)));
+ DBGL(DL_CNST, (llog(LL_DBG, "set_controller_state: controller [%d] set DOWN!", controller)));
}
else
{
- log(LL_ERR, "set_controller_state: invalid controller state [%d]!", state);
+ llog(LL_ERR, "set_controller_state: invalid controller state [%d]!", state);
return(ERROR);
}
return(GOOD);
@@ -372,7 +372,7 @@ get_controller_state(int controller)
{
if((controller < 0) || (controller >= ncontroller))
{
- log(LL_ERR, "set_controller_state: invalid controller number [%d]!", controller);
+ llog(LL_ERR, "set_controller_state: invalid controller number [%d]!", controller);
return(ERROR);
}
return(isdn_ctrl_tab[controller].state);
@@ -386,18 +386,18 @@ decr_free_channels(int controller)
{
if((controller < 0) || (controller >= ncontroller))
{
- log(LL_ERR, "decr_free_channels: invalid controller number [%d]!", controller);
+ llog(LL_ERR, "decr_free_channels: invalid controller number [%d]!", controller);
return(ERROR);
}
if(isdn_ctrl_tab[controller].freechans > 0)
{
(isdn_ctrl_tab[controller].freechans)--;
- DBGL(DL_CNST, (log(LL_DBG, "decr_free_channels: ctrl %d, now %d chan free", controller, isdn_ctrl_tab[controller].freechans)));
+ DBGL(DL_CNST, (llog(LL_DBG, "decr_free_channels: ctrl %d, now %d chan free", controller, isdn_ctrl_tab[controller].freechans)));
return(GOOD);
}
else
{
- log(LL_ERR, "decr_free_channels: controller [%d] already 0 free chans!", controller);
+ llog(LL_ERR, "decr_free_channels: controller [%d] already 0 free chans!", controller);
return(ERROR);
}
}
@@ -410,18 +410,18 @@ incr_free_channels(int controller)
{
if((controller < 0) || (controller >= ncontroller))
{
- log(LL_ERR, "incr_free_channels: invalid controller number [%d]!", controller);
+ llog(LL_ERR, "incr_free_channels: invalid controller number [%d]!", controller);
return(ERROR);
}
if(isdn_ctrl_tab[controller].freechans < isdn_ctrl_tab[controller].nbch)
{
(isdn_ctrl_tab[controller].freechans)++;
- DBGL(DL_CNST, (log(LL_DBG, "incr_free_channels: ctrl %d, now %d chan free", controller, isdn_ctrl_tab[controller].freechans)));
+ DBGL(DL_CNST, (llog(LL_DBG, "incr_free_channels: ctrl %d, now %d chan free", controller, isdn_ctrl_tab[controller].freechans)));
return(GOOD);
}
else
{
- log(LL_ERR, "incr_free_channels: controller [%d] already %d free chans!", controller, isdn_ctrl_tab[controller].nbch);
+ llog(LL_ERR, "incr_free_channels: controller [%d] already %d free chans!", controller, isdn_ctrl_tab[controller].nbch);
return(ERROR);
}
}
@@ -434,10 +434,10 @@ get_free_channels(int controller)
{
if((controller < 0) || (controller >= ncontroller))
{
- log(LL_ERR, "get_free_channels: invalid controller number [%d]!", controller);
+ llog(LL_ERR, "get_free_channels: invalid controller number [%d]!", controller);
return(ERROR);
}
- DBGL(DL_CNST, (log(LL_DBG, "get_free_channels: ctrl %d, %d chan free", controller, isdn_ctrl_tab[controller].freechans)));
+ DBGL(DL_CNST, (llog(LL_DBG, "get_free_channels: ctrl %d, %d chan free", controller, isdn_ctrl_tab[controller].freechans)));
return(isdn_ctrl_tab[controller].freechans);
}
@@ -449,24 +449,24 @@ set_channel_busy(int controller, int channel)
{
if((controller < 0) || (controller >= ncontroller))
{
- log(LL_ERR, "set_channel_busy: invalid controller number [%d]!", controller);
+ llog(LL_ERR, "set_channel_busy: invalid controller number [%d]!", controller);
return(ERROR);
}
if ((channel < 0) || (channel >= isdn_ctrl_tab[controller].nbch))
{
- log(LL_ERR, "set_channel_busy: controller [%d] invalid channel [%d]!", controller, channel);
+ llog(LL_ERR, "set_channel_busy: controller [%d] invalid channel [%d]!", controller, channel);
return(ERROR);
}
if(isdn_ctrl_tab[controller].stateb[channel] == CHAN_RUN)
{
- DBGL(DL_CNST, (log(LL_DBG, "set_channel_busy: controller [%d] channel B%d already busy!", controller, channel+1)));
+ DBGL(DL_CNST, (llog(LL_DBG, "set_channel_busy: controller [%d] channel B%d already busy!", controller, channel+1)));
}
else
{
isdn_ctrl_tab[controller].stateb[channel] = CHAN_RUN;
- DBGL(DL_CNST, (log(LL_DBG, "set_channel_busy: controller [%d] channel B%d set to BUSY!", controller, channel+1)));
+ DBGL(DL_CNST, (llog(LL_DBG, "set_channel_busy: controller [%d] channel B%d set to BUSY!", controller, channel+1)));
}
return(GOOD);
}
@@ -479,24 +479,24 @@ set_channel_idle(int controller, int channel)
{
if((controller < 0) || (controller >= ncontroller))
{
- log(LL_ERR, "set_channel_idle: invalid controller number [%d]!", controller);
+ llog(LL_ERR, "set_channel_idle: invalid controller number [%d]!", controller);
return(ERROR);
}
if ((channel < 0) || (channel >= isdn_ctrl_tab[controller].nbch))
{
- log(LL_ERR, "set_channel_busy: controller [%d] invalid channel [%d]!", controller, channel);
+ llog(LL_ERR, "set_channel_busy: controller [%d] invalid channel [%d]!", controller, channel);
return(ERROR);
}
if (isdn_ctrl_tab[controller].stateb[channel] == CHAN_IDLE)
{
- DBGL(DL_CNST, (log(LL_DBG, "set_channel_idle: controller [%d] channel B%d already idle!", controller, channel+1)));
+ DBGL(DL_CNST, (llog(LL_DBG, "set_channel_idle: controller [%d] channel B%d already idle!", controller, channel+1)));
}
else
{
isdn_ctrl_tab[controller].stateb[channel] = CHAN_IDLE;
- DBGL(DL_CNST, (log(LL_DBG, "set_channel_idle: controller [%d] channel B%d set to IDLE!", controller, channel+1)));
+ DBGL(DL_CNST, (llog(LL_DBG, "set_channel_idle: controller [%d] channel B%d set to IDLE!", controller, channel+1)));
}
return(GOOD);
}
@@ -509,13 +509,13 @@ ret_channel_state(int controller, int channel)
{
if((controller < 0) || (controller >= ncontroller))
{
- log(LL_ERR, "ret_channel_state: invalid controller number [%d]!", controller);
+ llog(LL_ERR, "ret_channel_state: invalid controller number [%d]!", controller);
return(ERROR);
}
if ((channel < 0) || (channel >= isdn_ctrl_tab[controller].nbch))
{
- log(LL_ERR, "set_channel_busy: controller [%d] invalid channel [%d]!", controller, channel);
+ llog(LL_ERR, "set_channel_busy: controller [%d] invalid channel [%d]!", controller, channel);
return(ERROR);
}
diff --git a/usr.sbin/i4b/isdnd/curses.c b/usr.sbin/i4b/isdnd/curses.c
index 19e7af7..a086b23 100644
--- a/usr.sbin/i4b/isdnd/curses.c
+++ b/usr.sbin/i4b/isdnd/curses.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Tue Mar 26 14:35:33 2002]
+ * last edit-date: [Sat May 13 13:05:36 2006]
*
*---------------------------------------------------------------------------*/
@@ -58,7 +58,7 @@ init_screen(void)
if((COLS < 80) || (LINES < 24))
{
- log(LL_ERR, "ERROR, minimal screensize must be 80x24, is %dx%d, terminating!",COLS, LINES);
+ llog(LL_ERR, "ERROR, minimal screensize must be 80x24, is %dx%d, terminating!",COLS, LINES);
do_exit(1);
}
@@ -70,19 +70,19 @@ init_screen(void)
if((upper_w = newwin(uheight, COLS, UPPER_B, 0)) == NULL)
{
- log(LL_ERR, "ERROR, curses init upper window, terminating!");
+ llog(LL_ERR, "ERROR, curses init upper window, terminating!");
exit(1);
}
if((mid_w = newwin(1, COLS, UPPER_B+uheight+1, 0)) == NULL)
{
- log(LL_ERR, "ERROR, curses init mid window, terminating!");
+ llog(LL_ERR, "ERROR, curses init mid window, terminating!");
exit(1);
}
if((lower_w = newwin(lheight, COLS, UPPER_B+uheight+3, 0)) == NULL)
{
- log(LL_ERR, "ERROR, curses init lower window, LINES = %d, lheight = %d, uheight = %d, terminating!", LINES, lheight, uheight);
+ llog(LL_ERR, "ERROR, curses init lower window, LINES = %d, lheight = %d, uheight = %d, terminating!", LINES, lheight, uheight);
exit(1);
}
@@ -176,7 +176,7 @@ do_menu(void)
if((menu_w = newwin(WMENU_HGT, WMENU_LEN, WMENU_POSLN, WMENU_POSCO )) == NULL)
{
- log(LL_WRN, "ERROR, curses init menu window!");
+ llog(LL_WRN, "ERROR, curses init menu window!");
return;
}
@@ -589,7 +589,7 @@ display_chans(void)
if((chan_w = newwin(nlines, ncols, pos_y, pos_x )) == NULL)
{
- log(LL_WRN, "ERROR, curses init channel window!");
+ llog(LL_WRN, "ERROR, curses init channel window!");
if (cnt > 0)
free(cc);
return;
@@ -679,7 +679,7 @@ display_chans(void)
if((cep = get_cep_by_cc(cc[nlines-1].cntl, cc[nlines-1].chn))
!= NULL)
{
- log(LL_CHD, "%05d %s manual disconnect (fullscreen menu)", cep->cdid, cep->name);
+ llog(LL_CHD, "%05d %s manual disconnect (fullscreen menu)", cep->cdid, cep->name);
cep->hangup = 1;
break;
}
@@ -713,7 +713,7 @@ display_cards(void)
if((chan_w = newwin(nlines, ncols, pos_y, pos_x )) == NULL)
{
- log(LL_WRN, "ERROR, curses init channel window!");
+ llog(LL_WRN, "ERROR, curses init channel window!");
return;
}
@@ -795,7 +795,7 @@ display_budget(void)
if((bud_w = newwin(nlines, ncols, pos_y, pos_x )) == NULL)
{
- log(LL_WRN, "ERROR, curses init budget window!");
+ llog(LL_WRN, "ERROR, curses init budget window!");
return;
}
diff --git a/usr.sbin/i4b/isdnd/dial.c b/usr.sbin/i4b/isdnd/dial.c
index 5ccbd33..158e1c0 100644
--- a/usr.sbin/i4b/isdnd/dial.c
+++ b/usr.sbin/i4b/isdnd/dial.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Tue Mar 26 14:35:19 2002]
+ * last edit-date: [Sat May 13 13:05:52 2006]
*
*---------------------------------------------------------------------------*/
@@ -49,7 +49,7 @@ select_first_dialno(cfg_entry_t *cep)
if(cep->remote_numbers_count < 1)
{
- log(LL_ERR, "select_first_dialno: remote_numbers_count < 1!");
+ llog(LL_ERR, "select_first_dialno: remote_numbers_count < 1!");
return;
}
@@ -57,7 +57,7 @@ select_first_dialno(cfg_entry_t *cep)
{
strcpy(cep->remote_phone_dialout.number, cep->remote_numbers[0].number);
strcpy(cep->remote_phone_dialout.subaddr, cep->remote_numbers[0].subaddr);
- DBGL(DL_DIAL, (log(LL_DBG, "select_first_dialno: only one no, no = %s", cep->remote_phone_dialout.number)));
+ DBGL(DL_DIAL, (llog(LL_DBG, "select_first_dialno: only one no, no = %s", cep->remote_phone_dialout.number)));
cep->last_remote_number = 0;
return;
}
@@ -66,7 +66,7 @@ select_first_dialno(cfg_entry_t *cep)
{
strcpy(cep->remote_phone_dialout.number, cep->remote_numbers[0].number);
strcpy(cep->remote_phone_dialout.subaddr, cep->remote_numbers[0].subaddr);
- DBGL(DL_DIAL, (log(LL_DBG, "select_first_dialno: use first, no = %s", cep->remote_phone_dialout.number)));
+ DBGL(DL_DIAL, (llog(LL_DBG, "select_first_dialno: use first, no = %s", cep->remote_phone_dialout.number)));
cep->last_remote_number = 0;
return;
}
@@ -81,7 +81,7 @@ select_first_dialno(cfg_entry_t *cep)
{
strcpy(cep->remote_phone_dialout.number, cep->remote_numbers[i].number);
strcpy(cep->remote_phone_dialout.subaddr, cep->remote_numbers[i].subaddr);
- DBGL(DL_DIAL, (log(LL_DBG, "select_first_dialno: use last, no = %s", cep->remote_phone_dialout.number)));
+ DBGL(DL_DIAL, (llog(LL_DBG, "select_first_dialno: use last, no = %s", cep->remote_phone_dialout.number)));
cep->last_remote_number = i;
return;
}
@@ -92,7 +92,7 @@ select_first_dialno(cfg_entry_t *cep)
strcpy(cep->remote_phone_dialout.number, cep->remote_numbers[i].number);
strcpy(cep->remote_phone_dialout.subaddr, cep->remote_numbers[i].subaddr);
- DBGL(DL_DIAL, (log(LL_DBG, "select_first_dialno: use next, no = %s", cep->remote_phone_dialout.number)));
+ DBGL(DL_DIAL, (llog(LL_DBG, "select_first_dialno: use next, no = %s", cep->remote_phone_dialout.number)));
cep->last_remote_number = i;
return;
}
@@ -102,7 +102,7 @@ select_first_dialno(cfg_entry_t *cep)
i = 0;
}
strcpy(cep->remote_phone_dialout.number, cep->remote_numbers[0].number);
- DBGL(DL_DIAL, (log(LL_DBG, "select_first_dialno: no last found (use 0), no = %s", cep->remote_phone_dialout.number)));
+ DBGL(DL_DIAL, (llog(LL_DBG, "select_first_dialno: no last found (use 0), no = %s", cep->remote_phone_dialout.number)));
cep->last_remote_number = 0;
}
@@ -114,7 +114,7 @@ select_next_dialno(cfg_entry_t *cep)
{
if(cep->remote_numbers_count < 1)
{
- log(LL_ERR, "select_next_dialno: remote_numbers_count < 1!");
+ llog(LL_ERR, "select_next_dialno: remote_numbers_count < 1!");
return;
}
@@ -122,7 +122,7 @@ select_next_dialno(cfg_entry_t *cep)
{
strcpy(cep->remote_phone_dialout.number, cep->remote_numbers[0].number);
strcpy(cep->remote_phone_dialout.subaddr, cep->remote_numbers[0].subaddr);
- DBGL(DL_DIAL, (log(LL_DBG, "select_next_dialno: only one no, no = %s", cep->remote_phone_dialout.number)));
+ DBGL(DL_DIAL, (llog(LL_DBG, "select_next_dialno: only one no, no = %s", cep->remote_phone_dialout.number)));
cep->last_remote_number = 0;
return;
}
@@ -140,7 +140,7 @@ select_next_dialno(cfg_entry_t *cep)
strcpy(cep->remote_phone_dialout.number, cep->remote_numbers[cep->last_remote_number].number);
- DBGL(DL_DIAL, (log(LL_DBG, "select_next_dialno: index=%d, no=%s",
+ DBGL(DL_DIAL, (llog(LL_DBG, "select_next_dialno: index=%d, no=%s",
cep->last_remote_number,
cep->remote_numbers[cep->last_remote_number].number)));
}
@@ -153,7 +153,7 @@ select_this_dialno(cfg_entry_t *cep)
{
cep->remote_numbers[cep->last_remote_number].flag = RNF_SUCC;
- DBGL(DL_DIAL, (log(LL_DBG, "select_this_dialno: index = %d, no = %s",
+ DBGL(DL_DIAL, (llog(LL_DBG, "select_this_dialno: index = %d, no = %s",
cep->last_remote_number,
cep->remote_numbers[cep->last_remote_number].number)));
}
diff --git a/usr.sbin/i4b/isdnd/exec.c b/usr.sbin/i4b/isdnd/exec.c
index 0c1254f..1bb09b9 100644
--- a/usr.sbin/i4b/isdnd/exec.c
+++ b/usr.sbin/i4b/isdnd/exec.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Tue Mar 26 14:35:46 2002]
+ * last edit-date: [Sat May 13 13:06:12 2006]
*
*---------------------------------------------------------------------------*/
@@ -61,23 +61,23 @@ sigchild_handler(int sig)
if((pid = waitpid(-1, &retstat, WNOHANG)) <= 0)
{
- log(LL_ERR, "ERROR, sigchild_handler, waitpid: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, sigchild_handler, waitpid: %s", strerror(errno));
error_exit(1, "ERROR, sigchild_handler, waitpid: %s", strerror(errno));
}
else
{
if(WIFEXITED(retstat))
{
- DBGL(DL_PROC, (log(LL_DBG, "normal child (pid=%d) termination, exitstat = %d",
+ DBGL(DL_PROC, (llog(LL_DBG, "normal child (pid=%d) termination, exitstat = %d",
pid, WEXITSTATUS(retstat))));
}
else if(WIFSIGNALED(retstat))
{
if(WCOREDUMP(retstat))
- log(LL_WRN, "child (pid=%d) termination due to signal %d (coredump)",
+ llog(LL_WRN, "child (pid=%d) termination due to signal %d (coredump)",
pid, WTERMSIG(retstat));
else
- log(LL_WRN, "child (pid=%d) termination due to signal %d",
+ llog(LL_WRN, "child (pid=%d) termination due to signal %d",
pid, WTERMSIG(retstat));
}
}
@@ -90,7 +90,7 @@ sigchild_handler(int sig)
{
if(pid_tab[i].cep->cdid != CDID_UNUSED)
{
- DBGL(DL_PROC, (log(LL_DBG, "sigchild_handler: scheduling hangup for cdid %d, pid %d",
+ DBGL(DL_PROC, (llog(LL_DBG, "sigchild_handler: scheduling hangup for cdid %d, pid %d",
pid_tab[i].cep->cdid, pid_tab[i].pid)));
pid_tab[i].cep->hangup = 1;
}
@@ -123,12 +123,12 @@ exec_prog(char *prog, char **arglist)
strcat(tmp, arglist[a]);
}
- DBGL(DL_PROC, (log(LL_DBG, "exec_prog: %s, args:%s", path, tmp)));
+ DBGL(DL_PROC, (llog(LL_DBG, "exec_prog: %s, args:%s", path, tmp)));
switch(pid = fork())
{
case -1: /* error */
- log(LL_ERR, "ERROR, exec_prog/fork: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, exec_prog/fork: %s", strerror(errno));
error_exit(1, "ERROR, exec_prog/fork: %s", strerror(errno));
case 0: /* child */
break;
@@ -245,7 +245,7 @@ exec_answer(cfg_entry_t *cep)
/* exec program */
- DBGL(DL_PROC, (log(LL_DBG, "exec_answer: prog=[%s]", cep->answerprog)));
+ DBGL(DL_PROC, (llog(LL_DBG, "exec_answer: prog=[%s]", cep->answerprog)));
pid = exec_prog(cep->answerprog, argv);
@@ -283,7 +283,7 @@ check_and_kill(cfg_entry_t *cep)
{
pid_t kp;
- DBGL(DL_PROC, (log(LL_DBG, "check_and_kill: killing pid %d", pid_tab[i].pid)));
+ DBGL(DL_PROC, (llog(LL_DBG, "check_and_kill: killing pid %d", pid_tab[i].pid)));
kp = pid_tab[i].pid;
pid_tab[i].pid = 0;
@@ -312,18 +312,18 @@ upd_callstat_file(char *filename, int rotateflag)
{
/* file not there, create it and exit */
- log(LL_WRN, "upd_callstat_file: creating %s", filename);
+ llog(LL_WRN, "upd_callstat_file: creating %s", filename);
fp = fopen(filename, "w");
if(fp == NULL)
{
- log(LL_ERR, "ERROR, upd_callstat_file: cannot create %s, %s", filename, strerror(errno));
+ llog(LL_ERR, "ERROR, upd_callstat_file: cannot create %s, %s", filename, strerror(errno));
return;
}
ret = fprintf(fp, "%ld %ld 1", now, now);
if(ret <= 0)
- log(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno));
fclose(fp);
return;
@@ -341,7 +341,7 @@ upd_callstat_file(char *filename, int rotateflag)
{
/* file corrupt ? anyway, initialize */
- log(LL_WRN, "upd_callstat_file: initializing %s", filename);
+ llog(LL_WRN, "upd_callstat_file: initializing %s", filename);
s = l = now;
n = 0;
@@ -371,13 +371,13 @@ upd_callstat_file(char *filename, int rotateflag)
nfp = fopen(buf, "w");
if(nfp == NULL)
{
- log(LL_ERR, "ERROR, upd_callstat_file: cannot open for write %s, %s", buf, strerror(errno));
+ llog(LL_ERR, "ERROR, upd_callstat_file: cannot open for write %s, %s", buf, strerror(errno));
return;
}
ret = fprintf(nfp, "%ld %ld %d", s, l, n);
if(ret <= 0)
- log(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno));
fclose(nfp);
@@ -385,7 +385,7 @@ upd_callstat_file(char *filename, int rotateflag)
n = 0;
s = now;
- log(LL_WRN, "upd_callstat_file: rotate %s, new s=%ld l=%ld n=%d", filename, s, l, n);
+ llog(LL_WRN, "upd_callstat_file: rotate %s, new s=%ld l=%ld n=%d", filename, s, l, n);
}
}
@@ -399,7 +399,7 @@ upd_callstat_file(char *filename, int rotateflag)
ret = fprintf(fp, "%ld %ld %-3d", s, now, n);
if(ret <= 0)
- log(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, upd_callstat_file: fprintf failed: %s", strerror(errno));
fclose(fp);
}
diff --git a/usr.sbin/i4b/isdnd/fsm.c b/usr.sbin/i4b/isdnd/fsm.c
index e555fa8..b87b17e 100644
--- a/usr.sbin/i4b/isdnd/fsm.c
+++ b/usr.sbin/i4b/isdnd/fsm.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Tue Mar 26 14:35:56 2002]
+ * last edit-date: [Sat May 13 13:06:40 2006]
*
*---------------------------------------------------------------------------*/
@@ -90,7 +90,7 @@ static char *event_text[N_EVENTS] = {
static void
F_ill(cfg_entry_t *cep)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_ill: Illegal State reached !!!")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_ill: Illegal State reached !!!")));
}
/*---------------------------------------------------------------------------*
@@ -107,7 +107,7 @@ F_NcNa(cfg_entry_t *cep)
static void
F_MCI(cfg_entry_t *cep)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_MCI: tx SETUP_RESP_ACCEPT")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_MCI: tx SETUP_RESP_ACCEPT")));
sendm_connect_resp(cep, cep->cdid, SETUP_RESP_ACCEPT, 0);
start_timer(cep, TIMEOUT_CONNECT_ACTIVE);
}
@@ -118,7 +118,7 @@ F_MCI(cfg_entry_t *cep)
static void
F_MCAI(cfg_entry_t *cep)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_MCAI: Connection active!")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_MCAI: Connection active!")));
stop_timer(cep);
@@ -135,7 +135,7 @@ F_MCAI(cfg_entry_t *cep)
static void
F_TIMO(cfg_entry_t *cep)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_TIMO: Timout occured!")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_TIMO: Timout occured!")));
sendm_disconnect_req(cep, (CAUSET_I4B << 8) | CAUSE_I4B_NORMAL);
cep->cdid = CDID_UNUSED;
}
@@ -146,7 +146,7 @@ F_TIMO(cfg_entry_t *cep)
static void
F_IDIS(cfg_entry_t *cep)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_IDIS: disconnect indication")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_IDIS: disconnect indication")));
cep->cdid = CDID_UNUSED;
}
@@ -156,7 +156,7 @@ F_IDIS(cfg_entry_t *cep)
static void
F_DRQ(cfg_entry_t *cep)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_DRQ: local disconnect request")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_DRQ: local disconnect request")));
sendm_disconnect_req(cep, (CAUSET_I4B << 8) | CAUSE_I4B_NORMAL);
}
@@ -166,7 +166,7 @@ F_DRQ(cfg_entry_t *cep)
static void
F_MDI(cfg_entry_t *cep)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_MDI: disconnect indication, local disconnected")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_MDI: disconnect indication, local disconnected")));
cep->cdid = CDID_UNUSED;
}
@@ -176,7 +176,7 @@ F_MDI(cfg_entry_t *cep)
static void
F_DIAL(cfg_entry_t *cep)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_DIAL: local dial out request")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_DIAL: local dial out request")));
if(cep->dialrandincr)
cep->randomtime = (random() & RANDOM_MASK) + cep->recoverytime;
@@ -194,7 +194,7 @@ F_DIAL(cfg_entry_t *cep)
static void
F_DOK(cfg_entry_t *cep)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_DOK: dial out ok")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_DOK: dial out ok")));
select_this_dialno(cep);
}
@@ -214,7 +214,7 @@ F_DFL(cfg_entry_t *cep)
{
/* inside normal retry cycle */
- DBGL(DL_STATE, (log(LL_DBG, "F_DFL: dial fail, dial retry")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_DFL: dial fail, dial retry")));
select_next_dialno(cep);
cep->cdid = CDID_RESERVED;
cep->state = ST_DIALRTMRCHD;
@@ -225,7 +225,7 @@ F_DFL(cfg_entry_t *cep)
if(!cep->usedown)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_DFL: dial retry fail, dial retries exhausted")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_DFL: dial retry fail, dial retries exhausted")));
dialresponse(cep, DSTAT_TFAIL);
cep->cdid = CDID_UNUSED;
cep->dial_count = 0;
@@ -240,7 +240,7 @@ F_DFL(cfg_entry_t *cep)
if(cep->down_retry_count > cep->downtries)
{
/* set interface down */
- DBGL(DL_STATE, (log(LL_DBG, "F_DFL: dial retry cycle fail, setting interface down!")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_DFL: dial retry cycle fail, setting interface down!")));
dialresponse(cep, DSTAT_PFAIL);
if_down(cep);
cep->state = ST_DOWN;
@@ -248,7 +248,7 @@ F_DFL(cfg_entry_t *cep)
else
{
/* enter new dial retry cycle */
- DBGL(DL_STATE, (log(LL_DBG, "F_DFL: dial retry cycle fail, enter new retry cycle!")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_DFL: dial retry cycle fail, enter new retry cycle!")));
select_next_dialno(cep);
cep->state = ST_DIALRTMRCHD;
}
@@ -258,7 +258,7 @@ F_DFL(cfg_entry_t *cep)
}
else /* cdp->dialouttype == DIALOUT_CALLEDBACK */
{
- DBGL(DL_STATE, (log(LL_DBG, "F_DFL: calledback dial done, wait for incoming call")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_DFL: calledback dial done, wait for incoming call")));
cep->cdid = CDID_RESERVED;
cep->state = ST_PCB_WAITCALL;
}
@@ -270,7 +270,7 @@ F_DFL(cfg_entry_t *cep)
static void
F_ACBW(cfg_entry_t *cep)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_ACBW: local callback, wait callback recovery time")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_ACBW: local callback, wait callback recovery time")));
if(cep->dialrandincr)
cep->randomtime = (random() & RANDOM_MASK) + cep->recoverytime;
@@ -292,7 +292,7 @@ F_ACBR(cfg_entry_t *cep)
{
/* inside normal retry cycle */
- DBGL(DL_STATE, (log(LL_DBG, "F_ACBR: dial fail, dial retry")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_ACBR: dial fail, dial retry")));
select_next_dialno(cep);
cep->cdid = CDID_RESERVED;
cep->state = ST_ACB_DIALFAIL;
@@ -303,7 +303,7 @@ F_ACBR(cfg_entry_t *cep)
if(!cep->usedown)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_ACBR: dial retry fail, dial retries exhausted")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_ACBR: dial retry fail, dial retries exhausted")));
dialresponse(cep, DSTAT_TFAIL);
cep->cdid = CDID_UNUSED;
cep->dial_count = 0;
@@ -318,7 +318,7 @@ F_ACBR(cfg_entry_t *cep)
if(cep->down_retry_count > cep->downtries)
{
/* set interface down */
- DBGL(DL_STATE, (log(LL_DBG, "F_ACBR: dial retry cycle fail, setting interface down!")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_ACBR: dial retry cycle fail, setting interface down!")));
dialresponse(cep, DSTAT_PFAIL);
if_down(cep);
cep->state = ST_DOWN;
@@ -326,7 +326,7 @@ F_ACBR(cfg_entry_t *cep)
else
{
/* enter new dial retry cycle */
- DBGL(DL_STATE, (log(LL_DBG, "F_ACBR: dial retry cycle fail, enter new retry cycle!")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_ACBR: dial retry cycle fail, enter new retry cycle!")));
select_next_dialno(cep);
cep->state = ST_ACB_DIALFAIL;
}
@@ -341,7 +341,7 @@ F_ACBR(cfg_entry_t *cep)
static void
F_ALRT(cfg_entry_t *cep)
{
- DBGL(DL_STATE, (log(LL_DBG, "F_ALRT: local send alert request")));
+ DBGL(DL_STATE, (llog(LL_DBG, "F_ALRT: local send alert request")));
cep->alert_time = cep->alert;
@@ -385,7 +385,7 @@ next_state(cfg_entry_t *cep, int event)
if(event > N_EVENTS)
{
- log(LL_ERR, "next_state: event > N_EVENTS");
+ llog(LL_ERR, "next_state: event > N_EVENTS");
error_exit(1, "next_state: event > N_EVENTS");
}
@@ -393,7 +393,7 @@ next_state(cfg_entry_t *cep, int event)
if(currstate > N_STATES)
{
- log(LL_ERR, "next_state: currstate > N_STATES");
+ llog(LL_ERR, "next_state: currstate > N_STATES");
error_exit(1, "next_state: currstate > N_STATES");
}
@@ -401,13 +401,13 @@ next_state(cfg_entry_t *cep, int event)
if(newstate > N_STATES)
{
- log(LL_ERR, "next_state: newstate > N_STATES");
+ llog(LL_ERR, "next_state: newstate > N_STATES");
error_exit(1, "next_state: newstate > N_STATES");
}
if(newstate != ST_SUSE)
{
- DBGL(DL_STATE, (log(LL_DBG, "FSM event [%s]: [%s => %s]", event_text[event],
+ DBGL(DL_STATE, (llog(LL_DBG, "FSM event [%s]: [%s => %s]", event_text[event],
state_text[currstate],
state_text[newstate])));
}
@@ -416,7 +416,7 @@ next_state(cfg_entry_t *cep, int event)
if(newstate == ST_ILL)
{
- log(LL_ERR, "FSM ILLEGAL STATE, event=%s: oldstate=%s => newstate=%s]",
+ llog(LL_ERR, "FSM ILLEGAL STATE, event=%s: oldstate=%s => newstate=%s]",
event_text[event],
state_text[currstate],
state_text[newstate]);
@@ -424,7 +424,7 @@ next_state(cfg_entry_t *cep, int event)
if(newstate == ST_SUSE)
{
- DBGL(DL_STATE, (log(LL_DBG, "FSM (SUSE) event [%s]: [%s => %s]", event_text[event],
+ DBGL(DL_STATE, (llog(LL_DBG, "FSM (SUSE) event [%s]: [%s => %s]", event_text[event],
state_text[currstate],
state_text[cep->state])));
}
diff --git a/usr.sbin/i4b/isdnd/holiday.c b/usr.sbin/i4b/isdnd/holiday.c
index 5bf9582..714bd06 100644
--- a/usr.sbin/i4b/isdnd/holiday.c
+++ b/usr.sbin/i4b/isdnd/holiday.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Wed May 2 09:42:56 2001]
+ * last edit-date: [Sat May 13 13:06:56 2006]
*
* Format:
*
@@ -75,7 +75,7 @@ init_holidays(char *filename)
if((fp = fopen(filename, "r")) == NULL)
{
- DBGL(DL_VALID, (log(LL_DBG, "init_holiday: error opening holidayfile %s: %s!", filename, strerror(errno))));
+ DBGL(DL_VALID, (llog(LL_DBG, "init_holiday: error opening holidayfile %s: %s!", filename, strerror(errno))));
return;
}
@@ -94,7 +94,7 @@ init_holidays(char *filename)
ret = sscanf(buffer, "%d.%d", &day, &month);
if(ret != 2)
{
- log(LL_ERR, "init_holiday: parse error for string [%s]!", buffer);
+ llog(LL_ERR, "init_holiday: parse error for string [%s]!", buffer);
exit(1);
}
year = 0;
@@ -102,17 +102,17 @@ init_holidays(char *filename)
if((newh = (struct holiday *) malloc(sizeof(struct holiday))) == NULL)
{
- log(LL_ERR, "init_holiday: malloc failed for struct holiday!\n");
+ llog(LL_ERR, "init_holiday: malloc failed for struct holiday!\n");
exit(1);
}
if(year)
{
- DBGL(DL_VALID, (log(LL_DBG, "init_holidays: add %d.%d.%d", day, month, year)));
+ DBGL(DL_VALID, (llog(LL_DBG, "init_holidays: add %d.%d.%d", day, month, year)));
}
else
{
- DBGL(DL_VALID, (log(LL_DBG, "init_holidays: add %d.%d", day, month)));
+ DBGL(DL_VALID, (llog(LL_DBG, "init_holidays: add %d.%d", day, month)));
}
newh->day = day;
@@ -177,12 +177,12 @@ isholiday(int d, int m, int y)
{
if(ch->year == 0)
{
- DBGL(DL_VALID, (log(LL_DBG, "isholiday: %d.%d is a holiday!", d, m)));
+ DBGL(DL_VALID, (llog(LL_DBG, "isholiday: %d.%d is a holiday!", d, m)));
return(1);
}
else if(ch->year == y)
{
- DBGL(DL_VALID, (log(LL_DBG, "isholiday: %d.%d.%d is a holiday!", d, m, y)));
+ DBGL(DL_VALID, (llog(LL_DBG, "isholiday: %d.%d.%d is a holiday!", d, m, y)));
return(1);
}
}
diff --git a/usr.sbin/i4b/isdnd/isdnd.h b/usr.sbin/i4b/isdnd/isdnd.h
index e4a0ffc..803f97f 100644
--- a/usr.sbin/i4b/isdnd/isdnd.h
+++ b/usr.sbin/i4b/isdnd/isdnd.h
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Sun Aug 11 12:31:44 2002]
+ * last edit-date: [Sat May 13 13:18:48 2006]
*
*---------------------------------------------------------------------------*/
@@ -753,6 +753,7 @@ char prefixinternational[TELNO_MAX];
#endif /* MAIN */
+int add_number_prefix( char *number, int type_of_number );
char * bdrivername ( int drivertype );
void cfg_setval ( int keyword );
void check_and_kill ( cfg_entry_t *cep );
@@ -797,7 +798,7 @@ void init_controller ( void );
void init_controller_protocol ( void );
void init_log ( void );
void init_screen ( void );
-void log ( int what, const char *fmt, ... );
+void llog ( int what, const char *fmt, ... );
int main ( int argc, char **argv );
void msg_accounting ( msg_accounting_ind_t *mp );
void msg_alert_ind ( msg_alert_ind_t *mp );
@@ -816,6 +817,7 @@ void msg_l12stat_ind(msg_l12stat_ind_t *ml);
void msg_teiasg_ind(msg_teiasg_ind_t *mt);
void msg_proceeding_ind ( msg_proceeding_ind_t *mp );
void msg_packet_ind( msg_packet_ind_t *mp );
+void msg_keypad(msg_keypad_ind_t *mp);
const char * name_of_controller(int ctrl_type, int card_type);
void next_state ( cfg_entry_t *cep, int event );
char * print_i4b_cause( cause_t code );
diff --git a/usr.sbin/i4b/isdnd/log.c b/usr.sbin/i4b/isdnd/log.c
index 831f0a9..4117909 100644
--- a/usr.sbin/i4b/isdnd/log.c
+++ b/usr.sbin/i4b/isdnd/log.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Wed Dec 26 12:49:45 2001]
+ * last edit-date: [Sat May 13 13:07:18 2006]
*
*---------------------------------------------------------------------------*/
@@ -112,7 +112,7 @@ init_log(void)
if((p = malloc(strlen(buf) + 1)) == NULL)
{
- log(LL_DBG, "init_log: malloc failed: %s", strerror(errno));
+ llog(LL_DBG, "init_log: malloc failed: %s", strerror(errno));
do_exit(1);
}
@@ -143,7 +143,7 @@ finish_log(void)
* place entry into logfile
*---------------------------------------------------------------------------*/
void
-log(int what, const char *fmt, ...)
+llog(int what, const char *fmt, ...)
{
char buffer[LOGBUFLEN];
register char *dp;
diff --git a/usr.sbin/i4b/isdnd/main.c b/usr.sbin/i4b/isdnd/main.c
index 74e1e63..afdaa20 100644
--- a/usr.sbin/i4b/isdnd/main.c
+++ b/usr.sbin/i4b/isdnd/main.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Wed Dec 26 12:51:00 2001]
+ * last edit-date: [Sat May 13 13:03:56 2006]
*
*---------------------------------------------------------------------------*/
@@ -267,7 +267,7 @@ main(int argc, char **argv)
if((isdnfd = open(I4BDEVICE, O_RDWR)) < 0)
{
- log(LL_ERR, "main: cannot open %s: %s", I4BDEVICE, strerror(errno));
+ llog(LL_ERR, "main: cannot open %s: %s", I4BDEVICE, strerror(errno));
exit(1);
}
@@ -275,25 +275,25 @@ main(int argc, char **argv)
if((ioctl(isdnfd, I4B_VR_REQ, &mvr)) < 0)
{
- log(LL_ERR, "main: ioctl I4B_VR_REQ failed: %s", strerror(errno));
+ llog(LL_ERR, "main: ioctl I4B_VR_REQ failed: %s", strerror(errno));
do_exit(1);
}
if(mvr.version != VERSION)
{
- log(LL_ERR, "main: version mismatch, kernel %d, daemon %d", mvr.version, VERSION);
+ llog(LL_ERR, "main: version mismatch, kernel %d, daemon %d", mvr.version, VERSION);
do_exit(1);
}
if(mvr.release != REL)
{
- log(LL_ERR, "main: release mismatch, kernel %d, daemon %d", mvr.release, REL);
+ llog(LL_ERR, "main: release mismatch, kernel %d, daemon %d", mvr.release, REL);
do_exit(1);
}
if(mvr.step != STEP)
{
- log(LL_ERR, "main: step mismatch, kernel %d, daemon %d", mvr.step, STEP);
+ llog(LL_ERR, "main: step mismatch, kernel %d, daemon %d", mvr.step, STEP);
do_exit(1);
}
@@ -307,7 +307,7 @@ main(int argc, char **argv)
if(config_error_flag)
{
- log(LL_ERR, "there were %d error(s) in the configuration file, terminating!", config_error_flag);
+ llog(LL_ERR, "there were %d error(s) in the configuration file, terminating!", config_error_flag);
exit(1);
}
@@ -328,19 +328,19 @@ main(int argc, char **argv)
if((i = readrates(ratesfile)) == ERROR)
{
if(rate_error != NULL)
- log(LL_ERR, "%s", rate_error);
+ llog(LL_ERR, "%s", rate_error);
exit(1);
}
if(i == GOOD)
{
got_rate = 1; /* flag, ratesfile read and ok */
- DBGL(DL_RCCF, (log(LL_DBG, "ratesfile %s read successfully", ratesfile)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "ratesfile %s read successfully", ratesfile)));
}
else
{
if(rate_error != NULL)
- log(LL_WRN, "%s", rate_error);
+ llog(LL_WRN, "%s", rate_error);
}
/* if writing accounting info, open file, set unbuffered */
@@ -349,7 +349,7 @@ main(int argc, char **argv)
{
if((acctfp = fopen(acctfile, "a")) == NULL)
{
- log(LL_ERR, "ERROR, can't open acctfile %s for writing, terminating!", acctfile);
+ llog(LL_ERR, "ERROR, can't open acctfile %s for writing, terminating!", acctfile);
exit(1);
}
setvbuf(acctfp, (char *)NULL, _IONBF, 0);
@@ -398,7 +398,7 @@ main(int argc, char **argv)
if((rtprio(RTP_SET, getpid(), &rtp)) == -1)
{
- log(LL_ERR, "rtprio failed: %s", strerror(errno));
+ llog(LL_ERR, "rtprio failed: %s", strerror(errno));
do_exit(1);
}
}
@@ -430,7 +430,7 @@ do_exit(int exitval)
unlink(PIDFILE);
- log(LL_DMN, "daemon terminating, exitval = %d", exitval);
+ llog(LL_DMN, "daemon terminating, exitval = %d", exitval);
#ifdef USE_CURSES
if(do_fullscreen)
@@ -454,7 +454,7 @@ error_exit(int exitval, const char *fmt, ...)
unlink(PIDFILE);
- log(LL_DMN, "fatal error, daemon terminating, exitval = %d", exitval);
+ llog(LL_DMN, "fatal error, daemon terminating, exitval = %d", exitval);
#ifdef USE_CURSES
if(do_fullscreen)
@@ -515,7 +515,7 @@ mloop(
/* go into loop */
- log(LL_DMN, "i4b isdn daemon started (pid = %d)", getpid());
+ llog(LL_DMN, "i4b isdn daemon started (pid = %d)", getpid());
for(;;)
{
@@ -590,7 +590,7 @@ mloop(
{
if(errno != EINTR)
{
- log(LL_ERR, "mloop: ERROR, select error on isdn device, errno = %d!", errno);
+ llog(LL_ERR, "mloop: ERROR, select error on isdn device, errno = %d!", errno);
error_exit(1, "mloop: ERROR, select error on isdn device, errno = %d!", errno);
}
}
@@ -612,7 +612,7 @@ kbdrdhdl(void)
if(ch == ERR)
{
- log(LL_ERR, "kbdrdhdl: ERROR, read error on controlling tty, errno = %d!", errno);
+ llog(LL_ERR, "kbdrdhdl: ERROR, read error on controlling tty, errno = %d!", errno);
error_exit(1, "kbdrdhdl: ERROR, read error on controlling tty, errno = %d!", errno);
}
@@ -718,13 +718,13 @@ isdnrdhdl(void)
break;
default:
- log(LL_WRN, "ERROR, unknown message received from %sisdn (0x%x)", _PATH_DEV, msg_rd_buf[0]);
+ llog(LL_WRN, "ERROR, unknown message received from %sisdn (0x%x)", _PATH_DEV, msg_rd_buf[0]);
break;
}
}
else
{
- log(LL_WRN, "ERROR, read error on isdn device, errno = %d, length = %d", errno, len);
+ llog(LL_WRN, "ERROR, read error on isdn device, errno = %d, length = %d", errno, len);
}
}
@@ -736,7 +736,7 @@ rereadconfig(int dummy)
{
extern int entrycount;
- log(LL_DMN, "re-reading configuration file");
+ llog(LL_DMN, "re-reading configuration file");
close_allactive();
@@ -753,7 +753,7 @@ rereadconfig(int dummy)
if(config_error_flag)
{
- log(LL_ERR, "rereadconfig: there were %d error(s) in the configuration file, terminating!", config_error_flag);
+ llog(LL_ERR, "rereadconfig: there were %d error(s) in the configuration file, terminating!", config_error_flag);
error_exit(1, "rereadconfig: there were %d error(s) in the configuration file, terminating!", config_error_flag);
}
@@ -791,14 +791,14 @@ reopenfiles(int dummy)
if((rename(acctfile, filename)) != 0)
{
- log(LL_ERR, "reopenfiles: acct rename failed, cause = %s", strerror(errno));
+ llog(LL_ERR, "reopenfiles: acct rename failed, cause = %s", strerror(errno));
error_exit(1, "reopenfiles: acct rename failed, cause = %s", strerror(errno));
}
}
if((acctfp = fopen(acctfile, "a")) == NULL)
{
- log(LL_ERR, "ERROR, can't open acctfile %s for writing, terminating!", acctfile);
+ llog(LL_ERR, "ERROR, can't open acctfile %s for writing, terminating!", acctfile);
error_exit(1, "ERROR, can't open acctfile %s for writing, terminating!", acctfile);
}
setvbuf(acctfp, (char *)NULL, _IONBF, 0);
@@ -818,7 +818,7 @@ reopenfiles(int dummy)
if((rename(logfile, filename)) != 0)
{
- log(LL_ERR, "reopenfiles: log rename failed, cause = %s", strerror(errno));
+ llog(LL_ERR, "reopenfiles: log rename failed, cause = %s", strerror(errno));
error_exit(1, "reopenfiles: log rename failed, cause = %s", strerror(errno));
}
}
diff --git a/usr.sbin/i4b/isdnd/monitor.c b/usr.sbin/i4b/isdnd/monitor.c
index 45952eb..36739d1 100644
--- a/usr.sbin/i4b/isdnd/monitor.c
+++ b/usr.sbin/i4b/isdnd/monitor.c
@@ -35,7 +35,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Tue Mar 26 14:37:03 2002]
+ * last edit-date: [Sat May 13 13:08:15 2006]
*
*---------------------------------------------------------------------------*/
@@ -284,7 +284,7 @@ monitor_start_rights(const char *clientspec)
if(r.local)
local_rights = cur_add_entry;
- DBGL(DL_RCCF, (log(LL_DBG, "system: monitor = %s", clientspec)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: monitor = %s", clientspec)));
return I4BMAR_OK;
}
@@ -300,7 +300,7 @@ monitor_add_rights(int rights_mask)
cur_add_entry->rights |= rights_mask;
- DBGL(DL_RCCF, (log(LL_DBG, "system: monitor-access = 0x%x", rights_mask)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: monitor-access = 0x%x", rights_mask)));
}
/*---------------------------------------------------------------------------
@@ -386,7 +386,7 @@ monitor_create_remote_socket(int portno)
if(remotesockfd == -1)
{
- log(LL_MER, "could not create remote monitor socket: %s", strerror(errno));
+ llog(LL_MER, "could not create remote monitor socket: %s", strerror(errno));
return(-1);
}
@@ -394,7 +394,7 @@ monitor_create_remote_socket(int portno)
if(setsockopt(remotesockfd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof val))
{
- log(LL_MER, "could not setsockopt: %s", strerror(errno));
+ llog(LL_MER, "could not setsockopt: %s", strerror(errno));
return(-1);
}
@@ -406,13 +406,13 @@ monitor_create_remote_socket(int portno)
if(bind(remotesockfd, (struct sockaddr *)&sa, sizeof sa) == -1)
{
- log(LL_MER, "could not bind remote monitor socket to port %d: %s", portno, strerror(errno));
+ llog(LL_MER, "could not bind remote monitor socket to port %d: %s", portno, strerror(errno));
return(-1);
}
if(listen(remotesockfd, 0))
{
- log(LL_MER, "could not listen on monitor socket: %s", strerror(errno));
+ llog(LL_MER, "could not listen on monitor socket: %s", strerror(errno));
return(-1);
}
@@ -441,7 +441,7 @@ monitor_create_local_socket(void)
if (s == -1)
{
- log(LL_MER, "could not create local monitor socket, errno = %d", errno);
+ llog(LL_MER, "could not create local monitor socket, errno = %d", errno);
return(-1);
}
@@ -454,7 +454,7 @@ monitor_create_local_socket(void)
if (bind(s, (struct sockaddr *)&sa, SUN_LEN(&sa)))
{
- log(LL_MER, "could not bind local monitor socket [%s], errno = %d", local_rights->name, errno);
+ llog(LL_MER, "could not bind local monitor socket [%s], errno = %d", local_rights->name, errno);
return(-1);
}
@@ -462,7 +462,7 @@ monitor_create_local_socket(void)
if (listen(s, 0))
{
- log(LL_MER, "could not listen on local monitor socket, errno = %d", errno);
+ llog(LL_MER, "could not listen on local monitor socket, errno = %d", errno);
return(-1);
}
@@ -516,7 +516,7 @@ monitor_handle_input(fd_set *selset)
strcpy(source, con->source);
TAILQ_REMOVE(&connections, con, connections);
free(con);
- log(LL_DMN, "monitor closed from %s", source );
+ llog(LL_DMN, "monitor closed from %s", source );
}
}
}
@@ -607,7 +607,7 @@ monitor_handle_connect(int sockfd, int is_local)
if(r_mask == 0)
{
/* no rights - go away */
- log(LL_MER, "monitor access denied from %s", source);
+ llog(LL_MER, "monitor access denied from %s", source);
close(fd);
return;
}
@@ -621,7 +621,7 @@ monitor_handle_connect(int sockfd, int is_local)
con->rights = r_mask;
strcpy(con->source, source);
- log(LL_DMN, "monitor opened from %s rights 0x%x", source, r_mask);
+ llog(LL_DMN, "monitor opened from %s rights 0x%x", source, r_mask);
/* send initial data */
I4B_PREP_CMD(idata, I4B_MON_IDATA_CODE);
@@ -633,7 +633,7 @@ monitor_handle_connect(int sockfd, int is_local)
if((sock_write(fd, idata, sizeof idata)) == -1)
{
- log(LL_MER, "monitor_handle_connect: sock_write 1 error - %s", strerror(errno));
+ llog(LL_MER, "monitor_handle_connect: sock_write 1 error - %s", strerror(errno));
}
for (i = 0; i < ncontroller; i++)
@@ -648,7 +648,7 @@ monitor_handle_connect(int sockfd, int is_local)
if((sock_write(fd, ictrl, sizeof ictrl)) == -1)
{
- log(LL_MER, "monitor_handle_connect: sock_write 2 error - %s", strerror(errno));
+ llog(LL_MER, "monitor_handle_connect: sock_write 2 error - %s", strerror(errno));
}
}
@@ -670,7 +670,7 @@ monitor_handle_connect(int sockfd, int is_local)
if((sock_write(fd, ictrl, sizeof ictrl)) == -1)
{
- log(LL_MER, "monitor_handle_connect: sock_write 3 error - %s", strerror(errno));
+ llog(LL_MER, "monitor_handle_connect: sock_write 3 error - %s", strerror(errno));
}
}
@@ -723,7 +723,7 @@ cmd_dump_rights(int fd, int r_mask, u_int8_t *cmd, const char *source)
if((sock_write(fd, drini, sizeof drini)) == -1)
{
- log(LL_MER, "cmd_dump_rights: sock_write 1 error - %s", strerror(errno));
+ llog(LL_MER, "cmd_dump_rights: sock_write 1 error - %s", strerror(errno));
}
for (r = TAILQ_FIRST(&rights); r != NULL; r = TAILQ_NEXT(r, list))
@@ -735,7 +735,7 @@ cmd_dump_rights(int fd, int r_mask, u_int8_t *cmd, const char *source)
I4B_PUT_1B(dr, I4B_MON_DR_LOCAL, r->local);
if((sock_write(fd, dr, sizeof dr)) == -1)
{
- log(LL_MER, "cmd_dump_rights: sock_write 2 error - %s", strerror(errno));
+ llog(LL_MER, "cmd_dump_rights: sock_write 2 error - %s", strerror(errno));
}
}
}
@@ -779,7 +779,7 @@ cmd_dump_mcons(int fd, int rights, u_int8_t *cmd, const char * source)
if((sock_write(fd, dcini, sizeof dcini)) == -1)
{
- log(LL_MER, "cmd_dump_mcons: sock_write 1 error - %s", strerror(errno));
+ llog(LL_MER, "cmd_dump_mcons: sock_write 1 error - %s", strerror(errno));
}
for (con = TAILQ_FIRST(&connections); con != NULL; con = TAILQ_NEXT(con, connections))
@@ -801,7 +801,7 @@ cmd_dump_mcons(int fd, int rights, u_int8_t *cmd, const char * source)
#endif
if((sock_write(fd, dc, sizeof dc)) == -1)
{
- log(LL_MER, "cmd_dump_mcons: sock_write 2 error - %s", strerror(errno));
+ llog(LL_MER, "cmd_dump_mcons: sock_write 2 error - %s", strerror(errno));
}
}
}
@@ -845,7 +845,7 @@ monitor_command(struct monitor_connection * con, int fd, int rights)
{
if (u == 0)
{
- /* log(LL_MER, "monitor read 0 bytes"); */
+ /* llog(LL_MER, "monitor read 0 bytes"); */
/* socket closed by peer */
close(fd);
return 1;
@@ -857,7 +857,7 @@ monitor_command(struct monitor_connection * con, int fd, int rights)
if (bytes < I4B_MON_CMD_HDR)
{
- log(LL_MER, "monitor read only %d bytes", bytes);
+ llog(LL_MER, "monitor read only %d bytes", bytes);
return 0; /* errh? something must be wrong... */
}
@@ -866,7 +866,7 @@ monitor_command(struct monitor_connection * con, int fd, int rights)
if (bytes >= sizeof cmd)
{
close(fd);
- log(LL_MER, "monitor: garbage on connection");
+ llog(LL_MER, "monitor: garbage on connection");
return 1;
}
@@ -874,7 +874,7 @@ monitor_command(struct monitor_connection * con, int fd, int rights)
if(sock_read(fd, cmd, bytes) <= 0)
{
- log(LL_MER, "monitor: sock_read <= 0");
+ llog(LL_MER, "monitor: sock_read <= 0");
close(fd);
return 1;
}
@@ -900,7 +900,7 @@ monitor_command(struct monitor_connection * con, int fd, int rights)
if (code < 0 || code >= NUMCMD)
{
- log(LL_MER, "illegal command from client, code = %d\n",
+ llog(LL_MER, "illegal command from client, code = %d\n",
code);
return 0;
}
@@ -960,7 +960,7 @@ hangup_channel(int controller, int channel, const char *source)
return;
found:
- log(LL_CHD, "%05d %s manual disconnect (remote from %s)", cep->cdid, cep->name, source);
+ llog(LL_CHD, "%05d %s manual disconnect (remote from %s)", cep->cdid, cep->name, source);
cep->hangup = 1;
return;
}
@@ -982,7 +982,7 @@ monitor_broadcast(int mask, u_int8_t *pkt, size_t bytes)
if((sock_write(fd, pkt, bytes)) == -1)
{
- log(LL_MER, "monitor_broadcast: sock_write error - %s", strerror(errno));
+ llog(LL_MER, "monitor_broadcast: sock_write error - %s", strerror(errno));
}
}
}
diff --git a/usr.sbin/i4b/isdnd/msghdl.c b/usr.sbin/i4b/isdnd/msghdl.c
index 2687e48..4787a95 100644
--- a/usr.sbin/i4b/isdnd/msghdl.c
+++ b/usr.sbin/i4b/isdnd/msghdl.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Sun Aug 11 12:37:16 2002]
+ * last edit-date: [Sat May 13 13:09:33 2006]
*
*---------------------------------------------------------------------------*/
@@ -118,7 +118,7 @@ msg_connect_ind(msg_connect_ind_t *mp)
if(cep->inout == DIR_OUTONLY)
{
- log(LL_CHD, "%05d %s incoming call from %s to %s not allowed by configuration!",
+ llog(LL_CHD, "%05d %s incoming call from %s to %s not allowed by configuration!",
mp->header.cdid, cep->name, SRC, DST);
sendm_connect_resp(NULL, mp->header.cdid, SETUP_RESP_DNTCRE, 0);
handle_scrprs(mp->header.cdid, mp->scr_ind, mp->prs_ind, SRC);
@@ -131,14 +131,14 @@ msg_connect_ind(msg_connect_ind_t *mp)
switch(cep->dialin_reaction)
{
case REACT_ACCEPT:
- log(LL_CHD, "%05d %s accepting: incoming call from %s to %s",
+ llog(LL_CHD, "%05d %s accepting: incoming call from %s to %s",
mp->header.cdid, cep->name, SRC, DST);
decr_free_channels(mp->controller);
next_state(cep, EV_MCI);
break;
case REACT_REJECT:
- log(LL_CHD, "%05d %s rejecting: incoming call from %s to %s",
+ llog(LL_CHD, "%05d %s rejecting: incoming call from %s to %s",
mp->header.cdid, cep->name, SRC, DST);
sendm_connect_resp(cep, mp->header.cdid, SETUP_RESP_REJECT,
(CAUSET_I4B << 8) | CAUSE_I4B_REJECT);
@@ -146,7 +146,7 @@ msg_connect_ind(msg_connect_ind_t *mp)
break;
case REACT_IGNORE:
- log(LL_CHD, "%05d %s ignoring: incoming call from %s to %s",
+ llog(LL_CHD, "%05d %s ignoring: incoming call from %s to %s",
mp->header.cdid, cep->name, SRC, DST);
sendm_connect_resp(NULL, mp->header.cdid, SETUP_RESP_DNTCRE, 0);
cep->cdid = CDID_UNUSED;
@@ -158,12 +158,12 @@ msg_connect_ind(msg_connect_ind_t *mp)
{
if(mp->display)
{
- log(LL_CHD, "%05d %s alerting: incoming call from %s to %s (%s)",
+ llog(LL_CHD, "%05d %s alerting: incoming call from %s to %s (%s)",
mp->header.cdid, cep->name, SRC, DST, mp->display);
}
else
{
- log(LL_CHD, "%05d %s alerting: incoming call from %s to %s",
+ llog(LL_CHD, "%05d %s alerting: incoming call from %s to %s",
mp->header.cdid, cep->name, SRC, DST);
}
next_state(cep, EV_ALRT);
@@ -172,12 +172,12 @@ msg_connect_ind(msg_connect_ind_t *mp)
{
if(mp->display)
{
- log(LL_CHD, "%05d %s answering: incoming call from %s to %s (%s)",
+ llog(LL_CHD, "%05d %s answering: incoming call from %s to %s (%s)",
mp->header.cdid, cep->name, SRC, DST, mp->display);
}
else
{
- log(LL_CHD, "%05d %s answering: incoming call from %s to %s",
+ llog(LL_CHD, "%05d %s answering: incoming call from %s to %s",
mp->header.cdid, cep->name, SRC, DST);
}
next_state(cep, EV_MCI);
@@ -191,7 +191,7 @@ msg_connect_ind(msg_connect_ind_t *mp)
#endif
if(cep->cdid == CDID_RESERVED)
{
- log(LL_CHD, "%05d %s reserved: incoming call from %s to %s",
+ llog(LL_CHD, "%05d %s reserved: incoming call from %s to %s",
mp->header.cdid, cep->name, SRC, DST);
sendm_connect_resp(cep, mp->header.cdid, SETUP_RESP_REJECT,
#if 0
@@ -215,7 +215,7 @@ msg_connect_ind(msg_connect_ind_t *mp)
cep->budget_calltype = 0;
if(cep->budget_callbackncalls_cnt == 0)
{
- log(LL_CHD, "%05d %s no budget: call from %s to %s",
+ llog(LL_CHD, "%05d %s no budget: call from %s to %s",
mp->header.cdid, cep->name, SRC, DST);
cep->cdid = CDID_UNUSED;
cep->budget_callback_rej++;
@@ -227,7 +227,7 @@ msg_connect_ind(msg_connect_ind_t *mp)
}
}
- log(LL_CHD, "%05d %s callback: incoming call from %s to %s",
+ llog(LL_CHD, "%05d %s callback: incoming call from %s to %s",
mp->header.cdid, cep->name, SRC, DST);
cep->last_release_time = time(NULL);
@@ -237,7 +237,7 @@ msg_connect_ind(msg_connect_ind_t *mp)
break;
default:
- log(LL_WRN, "msg_connect_ind: unknown response type, tx SETUP_RESP_DNTCRE");
+ llog(LL_WRN, "msg_connect_ind: unknown response type, tx SETUP_RESP_DNTCRE");
sendm_connect_resp(NULL, mp->header.cdid, SETUP_RESP_DNTCRE, 0);
break;
}
@@ -257,7 +257,7 @@ msg_connect_active_ind(msg_connect_active_ind_t *mp)
if((cep = get_cep_by_cdid(mp->header.cdid)) == NULL)
{
- log(LL_WRN, "msg_connect_active_ind: cdid not found!");
+ llog(LL_WRN, "msg_connect_active_ind: cdid not found!");
return;
}
@@ -280,11 +280,11 @@ msg_connect_active_ind(msg_connect_active_ind_t *mp)
/* set the B-channel to active */
if((set_channel_busy(cep->isdncontrollerused, cep->isdnchannelused)) == ERROR)
- log(LL_ERR, "msg_connect_active_ind: set_channel_busy failed!");
+ llog(LL_ERR, "msg_connect_active_ind: set_channel_busy failed!");
if(cep->direction == DIR_OUT)
{
- log(LL_CHD, "%05d %s outgoing call active (ctl %d, ch %d, %s%d)",
+ llog(LL_CHD, "%05d %s outgoing call active (ctl %d, ch %d, %s%d)",
cep->cdid, cep->name,
cep->isdncontrollerused, cep->isdnchannelused,
bdrivername(cep->usrdevicename), cep->usrdeviceunit);
@@ -295,7 +295,7 @@ msg_connect_active_ind(msg_connect_active_ind_t *mp)
{
cep->budget_callback_done++;
cep->budget_callbackncalls_cnt--;
- DBGL(DL_BDGT, (log(LL_DBG, "%s: new cback-budget = %d",
+ DBGL(DL_BDGT, (llog(LL_DBG, "%s: new cback-budget = %d",
cep->name, cep->budget_callbackncalls_cnt)));
if(cep->budget_callbacks_file != NULL)
upd_callstat_file(cep->budget_callbacks_file, cep->budget_callbacksfile_rotate);
@@ -304,7 +304,7 @@ msg_connect_active_ind(msg_connect_active_ind_t *mp)
{
cep->budget_callout_done++;
cep->budget_calloutncalls_cnt--;
- DBGL(DL_BDGT, (log(LL_DBG, "%s: new cout-budget = %d",
+ DBGL(DL_BDGT, (llog(LL_DBG, "%s: new cout-budget = %d",
cep->name, cep->budget_calloutncalls_cnt)));
if(cep->budget_callouts_file != NULL)
upd_callstat_file(cep->budget_callouts_file, cep->budget_calloutsfile_rotate);
@@ -314,7 +314,7 @@ msg_connect_active_ind(msg_connect_active_ind_t *mp)
}
else
{
- log(LL_CHD, "%05d %s incoming call active (ctl %d, ch %d, %s%d)",
+ llog(LL_CHD, "%05d %s incoming call active (ctl %d, ch %d, %s%d)",
cep->cdid, cep->name,
cep->isdncontrollerused, cep->isdnchannelused,
bdrivername(cep->usrdevicename), cep->usrdeviceunit);
@@ -331,7 +331,7 @@ msg_connect_active_ind(msg_connect_active_ind_t *mp)
if(isdntime && (mp->datetime[0] != '\0'))
{
- log(LL_DMN, "date/time from exchange = %s", mp->datetime);
+ llog(LL_DMN, "date/time from exchange = %s", mp->datetime);
}
next_state(cep, EV_MCAI);
@@ -347,7 +347,7 @@ msg_proceeding_ind(msg_proceeding_ind_t *mp)
if((cep = get_cep_by_cdid(mp->header.cdid)) == NULL)
{
- log(LL_WRN, "msg_proceeding_ind: cdid not found!");
+ llog(LL_WRN, "msg_proceeding_ind: cdid not found!");
return;
}
@@ -357,9 +357,9 @@ msg_proceeding_ind(msg_proceeding_ind_t *mp)
/* set the B-channels active */
if((set_channel_busy(cep->isdncontrollerused, cep->isdnchannelused)) == ERROR)
- log(LL_ERR, "msg_proceeding_ind: set_channel_busy failed!");
+ llog(LL_ERR, "msg_proceeding_ind: set_channel_busy failed!");
- log(LL_CHD, "%05d %s outgoing call proceeding (ctl %d, ch %d)",
+ llog(LL_CHD, "%05d %s outgoing call proceeding (ctl %d, ch %d)",
cep->cdid, cep->name,
cep->isdncontrollerused, cep->isdnchannelused);
}
@@ -374,11 +374,11 @@ msg_alert_ind(msg_alert_ind_t *mp)
if((cep = get_cep_by_cdid(mp->header.cdid)) == NULL)
{
- log(LL_WRN, "msg_alert_ind: cdid not found!");
+ llog(LL_WRN, "msg_alert_ind: cdid not found!");
return;
}
#ifdef NOTDEF
- log(LL_CHD, "%05d %s incoming alert", cep->cdid, cep->name);
+ llog(LL_CHD, "%05d %s incoming alert", cep->cdid, cep->name);
#endif
}
@@ -390,7 +390,7 @@ msg_l12stat_ind(msg_l12stat_ind_t *ml)
{
if((ml->controller < 0) || (ml->controller >= ncontroller))
{
- log(LL_ERR, "msg_l12stat_ind: invalid controller number [%d]!", ml->controller);
+ llog(LL_ERR, "msg_l12stat_ind: invalid controller number [%d]!", ml->controller);
return;
}
@@ -403,7 +403,7 @@ msg_l12stat_ind(msg_l12stat_ind_t *ml)
monitor_evnt_l12stat(ml->controller, ml->layer, ml->state);
#endif
- DBGL(DL_CNST, (log(LL_DBG, "msg_l12stat_ind: unit %d, layer %d, state %d",
+ DBGL(DL_CNST, (llog(LL_DBG, "msg_l12stat_ind: unit %d, layer %d, state %d",
ml->controller, ml->layer, ml->state)));
if(ml->layer == LAYER_ONE)
@@ -420,7 +420,7 @@ msg_l12stat_ind(msg_l12stat_ind_t *ml)
}
else
{
- log(LL_ERR, "msg_l12stat_ind: invalid layer number [%d]!", ml->layer);
+ llog(LL_ERR, "msg_l12stat_ind: invalid layer number [%d]!", ml->layer);
}
}
@@ -432,7 +432,7 @@ msg_teiasg_ind(msg_teiasg_ind_t *mt)
{
if((mt->controller < 0) || (mt->controller >= ncontroller))
{
- log(LL_ERR, "msg_teiasg_ind: invalid controller number [%d]!", mt->controller);
+ llog(LL_ERR, "msg_teiasg_ind: invalid controller number [%d]!", mt->controller);
return;
}
@@ -445,7 +445,7 @@ msg_teiasg_ind(msg_teiasg_ind_t *mt)
monitor_evnt_tei(mt->controller, mt->tei);
#endif
- DBGL(DL_CNST, (log(LL_DBG, "msg_teiasg_ind: unit %d, tei = %d",
+ DBGL(DL_CNST, (llog(LL_DBG, "msg_teiasg_ind: unit %d, tei = %d",
mt->controller, mt->tei)));
isdn_ctrl_tab[mt->controller].tei = mt->tei;
@@ -478,7 +478,7 @@ msg_pdeact_ind(msg_pdeact_ind_t *md)
}
#endif
- DBGL(DL_CNST, (log(LL_DBG, "msg_pdeact_ind: unit %d, persistent deactivation", ctrl)));
+ DBGL(DL_CNST, (llog(LL_DBG, "msg_pdeact_ind: unit %d, persistent deactivation", ctrl)));
isdn_ctrl_tab[ctrl].l1stat = LAYER_IDLE;
isdn_ctrl_tab[ctrl].l2stat = LAYER_IDLE;
@@ -507,16 +507,16 @@ msg_pdeact_ind(msg_pdeact_ind_t *md)
if(cep->direction == DIR_OUT)
{
- log(LL_CHD, "%05d %s outgoing call disconnected (local)",
+ llog(LL_CHD, "%05d %s outgoing call disconnected (local)",
cep->cdid, cep->name);
}
else
{
- log(LL_CHD, "%05d %s incoming call disconnected (local)",
+ llog(LL_CHD, "%05d %s incoming call disconnected (local)",
cep->cdid, cep->name);
}
- log(LL_CHD, "%05d %s cause %s",
+ llog(LL_CHD, "%05d %s cause %s",
cep->cdid, cep->name, print_i4b_cause(cep->disc_cause));
#ifdef USE_CURSES
@@ -535,13 +535,13 @@ msg_pdeact_ind(msg_pdeact_ind_t *md)
{
if(cep->direction == DIR_OUT)
{
- log(LL_CHD, "%05d %s charging: %d units, %d seconds",
+ llog(LL_CHD, "%05d %s charging: %d units, %d seconds",
cep->cdid, cep->name, cep->charge,
(int)difftime(time(NULL), cep->connect_time));
}
else
{
- log(LL_CHD, "%05d %s connected %d seconds",
+ llog(LL_CHD, "%05d %s connected %d seconds",
cep->cdid, cep->name,
(int)difftime(time(NULL), cep->connect_time));
}
@@ -551,14 +551,14 @@ msg_pdeact_ind(msg_pdeact_ind_t *md)
if((cep->ioutbytes != cep->outbytes) ||
(cep->iinbytes != cep->inbytes))
{
- log(LL_CHD, "%05d %s accounting: in %d, out %d (in %d, out %d)",
+ llog(LL_CHD, "%05d %s accounting: in %d, out %d (in %d, out %d)",
cep->cdid, cep->name,
cep->inbytes, cep->outbytes,
cep->iinbytes, cep->ioutbytes);
}
else
{
- log(LL_CHD, "%05d %s accounting: in %d, out %d",
+ llog(LL_CHD, "%05d %s accounting: in %d, out %d",
cep->cdid, cep->name,
cep->inbytes, cep->outbytes);
}
@@ -595,7 +595,7 @@ msg_pdeact_ind(msg_pdeact_ind_t *md)
/* set the B-channel inactive */
if((set_channel_idle(cep->isdncontrollerused, cep->isdnchannelused)) == ERROR)
- log(LL_ERR, "msg_pdeact_ind: set_channel_idle failed!");
+ llog(LL_ERR, "msg_pdeact_ind: set_channel_idle failed!");
incr_free_channels(cep->isdncontrollerused);
@@ -616,7 +616,7 @@ msg_negcomplete_ind(msg_negcomplete_ind_t *mp)
if((cep = get_cep_by_cdid(mp->header.cdid)) == NULL)
{
- log(LL_WRN, "msg_negcomp_ind: cdid not found");
+ llog(LL_WRN, "msg_negcomp_ind: cdid not found");
return;
}
@@ -635,12 +635,12 @@ msg_ifstatechg_ind(msg_ifstatechg_ind_t *mp)
if((cep = get_cep_by_cdid(mp->header.cdid)) == NULL)
{
- log(LL_WRN, "msg_negcomp_ind: cdid not found");
+ llog(LL_WRN, "msg_negcomp_ind: cdid not found");
return;
}
device = bdrivername(cep->usrdevicename);
- log(LL_DBG, "%s%d: switched to state %d", device, cep->usrdeviceunit, mp->state);
+ llog(LL_DBG, "%s%d: switched to state %d", device, cep->usrdeviceunit, mp->state);
}
/*---------------------------------------------------------------------------*
@@ -653,14 +653,14 @@ msg_disconnect_ind(msg_disconnect_ind_t *mp)
if((cep = get_cep_by_cdid(mp->header.cdid)) == NULL)
{
- log(LL_WRN, "msg_disconnect_ind: cdid not found");
+ llog(LL_WRN, "msg_disconnect_ind: cdid not found");
return;
}
/* is this an aborted out-call prematurely called back? */
if (cep->saved_call.cdid == mp->header.cdid)
{
- DBGL(DL_CNST, (log(LL_DBG, "aborted outcall %05d disconnected",
+ DBGL(DL_CNST, (llog(LL_DBG, "aborted outcall %05d disconnected",
mp->header.cdid)));
cep->saved_call.cdid = CDID_UNUSED;
@@ -675,20 +675,20 @@ msg_disconnect_ind(msg_disconnect_ind_t *mp)
if(cep->direction == DIR_OUT)
{
- log(LL_CHD, "%05d %s outgoing call disconnected %s",
+ llog(LL_CHD, "%05d %s outgoing call disconnected %s",
cep->cdid, cep->name,
cep->local_disconnect == DISCON_LOC ?
"(local)" : "(remote)");
}
else
{
- log(LL_CHD, "%05d %s incoming call disconnected %s",
+ llog(LL_CHD, "%05d %s incoming call disconnected %s",
cep->cdid, cep->name,
cep->local_disconnect == DISCON_LOC ?
"(local)" : "(remote)");
}
- log(LL_CHD, "%05d %s cause %s",
+ llog(LL_CHD, "%05d %s cause %s",
cep->cdid, cep->name, print_i4b_cause(mp->cause));
#ifdef USE_CURSES
@@ -707,13 +707,13 @@ msg_disconnect_ind(msg_disconnect_ind_t *mp)
{
if(cep->direction == DIR_OUT)
{
- log(LL_CHD, "%05d %s charging: %d units, %d seconds",
+ llog(LL_CHD, "%05d %s charging: %d units, %d seconds",
cep->cdid, cep->name, cep->charge,
(int)difftime(time(NULL), cep->connect_time));
}
else
{
- log(LL_CHD, "%05d %s connected %d seconds",
+ llog(LL_CHD, "%05d %s connected %d seconds",
cep->cdid, cep->name,
(int)difftime(time(NULL), cep->connect_time));
}
@@ -723,14 +723,14 @@ msg_disconnect_ind(msg_disconnect_ind_t *mp)
if((cep->ioutbytes != cep->outbytes) ||
(cep->iinbytes != cep->inbytes))
{
- log(LL_CHD, "%05d %s accounting: in %d, out %d (in %d, out %d)",
+ llog(LL_CHD, "%05d %s accounting: in %d, out %d (in %d, out %d)",
cep->cdid, cep->name,
cep->inbytes, cep->outbytes,
cep->iinbytes, cep->ioutbytes);
}
else
{
- log(LL_CHD, "%05d %s accounting: in %d, out %d",
+ llog(LL_CHD, "%05d %s accounting: in %d, out %d",
cep->cdid, cep->name,
cep->inbytes, cep->outbytes);
}
@@ -784,11 +784,11 @@ msg_dialout(msg_dialout_ind_t *mp)
{
cfg_entry_t *cep;
- DBGL(DL_DRVR, (log(LL_DBG, "msg_dialout: dial req from %s, unit %d", bdrivername(mp->driver), mp->driver_unit)));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_dialout: dial req from %s, unit %d", bdrivername(mp->driver), mp->driver_unit)));
if((cep = find_by_device_for_dialout(mp->driver, mp->driver_unit)) == NULL)
{
- DBGL(DL_DRVR, (log(LL_DBG, "msg_dialout: config entry reserved or no match")));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_dialout: config entry reserved or no match")));
return;
}
@@ -805,7 +805,7 @@ msg_dialout(msg_dialout_ind_t *mp)
if(cep->budget_calloutncalls_cnt == 0)
{
- log(LL_CHD, "%05d %s no budget for calling out", 0, cep->name);
+ llog(LL_CHD, "%05d %s no budget for calling out", 0, cep->name);
cep->budget_callout_rej++;
dialresponse(cep, DSTAT_TFAIL);
return;
@@ -818,7 +818,7 @@ msg_dialout(msg_dialout_ind_t *mp)
if((cep->cdid = get_cdid()) == 0)
{
- DBGL(DL_DRVR, (log(LL_DBG, "msg_dialout: get_cdid() returned 0!")));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_dialout: get_cdid() returned 0!")));
return;
}
@@ -837,11 +837,11 @@ msg_dialoutnumber(msg_dialoutnumber_ind_t *mp)
{
cfg_entry_t *cep;
- DBGL(DL_DRVR, (log(LL_DBG, "msg_dialoutnumber: dial req from %s, unit %d", bdrivername(mp->driver), mp->driver_unit)));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_dialoutnumber: dial req from %s, unit %d", bdrivername(mp->driver), mp->driver_unit)));
if((cep = find_by_device_for_dialoutnumber(mp)) == NULL)
{
- DBGL(DL_DRVR, (log(LL_DBG, "msg_dialoutnumber: config entry reserved or no match")));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_dialoutnumber: config entry reserved or no match")));
return;
}
@@ -858,7 +858,7 @@ msg_dialoutnumber(msg_dialoutnumber_ind_t *mp)
if(cep->budget_calloutncalls_cnt == 0)
{
- log(LL_CHD, "%05d %s no budget for calling out", 0, cep->name);
+ llog(LL_CHD, "%05d %s no budget for calling out", 0, cep->name);
cep->budget_callout_rej++;
dialresponse(cep, DSTAT_TFAIL);
return;
@@ -871,7 +871,7 @@ msg_dialoutnumber(msg_dialoutnumber_ind_t *mp)
if((cep->cdid = get_cdid()) == 0)
{
- DBGL(DL_DRVR, (log(LL_DBG, "msg_dialoutnumber: get_cdid() returned 0!")));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_dialoutnumber: get_cdid() returned 0!")));
return;
}
@@ -891,11 +891,11 @@ msg_keypad(msg_keypad_ind_t *mp)
{
cfg_entry_t *cep;
- DBGL(DL_DRVR, (log(LL_DBG, "msg_keypad: dial req from %s, unit %d", bdrivername(mp->driver), mp->driver_unit)));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_keypad: dial req from %s, unit %d", bdrivername(mp->driver), mp->driver_unit)));
if((cep = find_by_device_for_keypad(mp->driver, mp->driver_unit, mp->cmdlen, mp->cmd)) == NULL)
{
- DBGL(DL_DRVR, (log(LL_DBG, "msg_keypad: config entry reserved or no match")));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_keypad: config entry reserved or no match")));
return;
}
@@ -912,7 +912,7 @@ msg_keypad(msg_keypad_ind_t *mp)
if(cep->budget_calloutncalls_cnt == 0)
{
- log(LL_CHD, "%05d %s no budget for calling out", 0, cep->name);
+ llog(LL_CHD, "%05d %s no budget for calling out", 0, cep->name);
cep->budget_callout_rej++;
dialresponse(cep, DSTAT_TFAIL);
return;
@@ -925,7 +925,7 @@ msg_keypad(msg_keypad_ind_t *mp)
if((cep->cdid = get_cdid()) == 0)
{
- DBGL(DL_DRVR, (log(LL_DBG, "msg_keypad: get_cdid() returned 0!")));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_keypad: get_cdid() returned 0!")));
return;
}
@@ -944,11 +944,11 @@ msg_drvrdisc_req(msg_drvrdisc_req_t *mp)
{
cfg_entry_t *cep;
- DBGL(DL_DRVR, (log(LL_DBG, "msg_drvrdisc_req: req from %s, unit %d", bdrivername(mp->driver), mp->driver_unit)));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_drvrdisc_req: req from %s, unit %d", bdrivername(mp->driver), mp->driver_unit)));
if((cep = get_cep_by_driver(mp->driver, mp->driver_unit)) == NULL)
{
- DBGL(DL_DRVR, (log(LL_DBG, "msg_drvrdisc_req: config entry not found")));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_drvrdisc_req: config entry not found")));
return;
}
next_state(cep, EV_DRQ);
@@ -964,7 +964,7 @@ msg_accounting(msg_accounting_ind_t *mp)
if((cep = find_active_entry_by_driver(mp->driver, mp->driver_unit)) == NULL)
{
- log(LL_WRN, "msg_accounting: no config entry found!");
+ llog(LL_WRN, "msg_accounting: no config entry found!");
return;
}
@@ -1004,17 +1004,17 @@ msg_charging_ind(msg_charging_ind_t *mp)
if((cep = get_cep_by_cdid(mp->header.cdid)) == NULL)
{
- log(LL_WRN, "msg_charging_ind: cdid not found");
+ llog(LL_WRN, "msg_charging_ind: cdid not found");
return;
}
if(mp->units_type < CHARGE_INVALID || mp->units_type > CHARGE_CALC)
{
- log(LL_ERR, "msg_charging: units_type %d out of range!", mp->units_type);
+ llog(LL_ERR, "msg_charging: units_type %d out of range!", mp->units_type);
error_exit(1, "msg_charging: units_type %d out of range!", mp->units_type);
}
- DBGL(DL_DRVR, (log(LL_DBG, "msg_charging: %d unit(s) (%s)",
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_charging: %d unit(s) (%s)",
mp->units, cttab[mp->units_type])));
cep->charge = mp->units;
@@ -1053,13 +1053,13 @@ msg_idle_timeout_ind(msg_idle_timeout_ind_t *mp)
if((cep = get_cep_by_cdid(mp->header.cdid)) == NULL)
{
- log(LL_WRN, "msg_idle_timeout_ind: cdid not found!");
+ llog(LL_WRN, "msg_idle_timeout_ind: cdid not found!");
return;
}
cep->local_disconnect = DISCON_LOC;
- DBGL(DL_DRVR, (log(LL_DBG, "msg_idle_timeout_ind: idletimeout, kernel sent disconnect!")));
+ DBGL(DL_DRVR, (llog(LL_DBG, "msg_idle_timeout_ind: idletimeout, kernel sent disconnect!")));
check_and_kill(cep);
}
@@ -1165,7 +1165,7 @@ msg_packet_ind(msg_packet_ind_t *mp)
cptr = ipapp( cptr, ip->ip_dst.s_addr);
}
- log(LL_PKT, "%s %s %u %s",
+ llog(LL_PKT, "%s %s %u %s",
name, mp->direction ? "send" : "recv",
ntohs( ip->ip_len ), tmp );
}
@@ -1182,7 +1182,7 @@ get_cdid(void)
if((ioctl(isdnfd, I4B_CDID_REQ, &mcr)) < 0)
{
- log(LL_ERR, "get_cdid: ioctl I4B_CDID_REQ failed: %s", strerror(errno));
+ llog(LL_ERR, "get_cdid: ioctl I4B_CDID_REQ failed: %s", strerror(errno));
error_exit(1, "get_cdid: ioctl I4B_CDID_REQ failed: %s", strerror(errno));
}
@@ -1236,17 +1236,17 @@ sendm_connect_req(cfg_entry_t *cep)
cep->last_dial_time = time(NULL);
cep->direction = DIR_OUT;
- DBGL(DL_CNST, (log(LL_DBG, "sendm_connect_req: ctrl = %d, chan = %d", cep->isdncontrollerused, cep->isdnchannelused)));
+ DBGL(DL_CNST, (llog(LL_DBG, "sendm_connect_req: ctrl = %d, chan = %d", cep->isdncontrollerused, cep->isdnchannelused)));
if((ret = ioctl(isdnfd, I4B_CONNECT_REQ, &mcr)) < 0)
{
- log(LL_ERR, "sendm_connect_req: ioctl I4B_CONNECT_REQ failed: %s", strerror(errno));
+ llog(LL_ERR, "sendm_connect_req: ioctl I4B_CONNECT_REQ failed: %s", strerror(errno));
error_exit(1, "sendm_connect_req: ioctl I4B_CONNECT_REQ failed: %s", strerror(errno));
}
decr_free_channels(cep->isdncontrollerused);
- log(LL_CHD, "%05d %s dialing out from %s to %s",
+ llog(LL_CHD, "%05d %s dialing out from %s to %s",
cep->cdid,
cep->name,
aliasing ? get_alias(cep->local_phone_dialout.number) : cep->local_phone_dialout.number,
@@ -1271,7 +1271,7 @@ sendm_connect_resp(cfg_entry_t *cep, int cdid, int response, cause_t cause)
if(response == SETUP_RESP_REJECT)
{
mcr.cause = cause;
- DBGL(DL_DRVR, (log(LL_DBG, "sendm_connect_resp: reject, cause=0x%x", cause)));
+ DBGL(DL_DRVR, (llog(LL_DBG, "sendm_connect_resp: reject, cause=0x%x", cause)));
}
else if(response == SETUP_RESP_ACCEPT)
{
@@ -1287,12 +1287,12 @@ sendm_connect_resp(cfg_entry_t *cep, int cdid, int response, cause_t cause)
mcr.max_idle_time = cep->idle_time_in;
- DBGL(DL_DRVR, (log(LL_DBG, "sendm_connect_resp: accept")));
+ DBGL(DL_DRVR, (llog(LL_DBG, "sendm_connect_resp: accept")));
}
if((ret = ioctl(isdnfd, I4B_CONNECT_RESP, &mcr)) < 0)
{
- log(LL_ERR, "sendm_connect_resp: ioctl I4B_CONNECT_RESP failed: %s", strerror(errno));
+ llog(LL_ERR, "sendm_connect_resp: ioctl I4B_CONNECT_RESP failed: %s", strerror(errno));
error_exit(1, "sendm_connect_resp: ioctl I4B_CONNECT_RESP failed: %s", strerror(errno));
}
return(ret);
@@ -1315,11 +1315,11 @@ sendm_disconnect_req(cfg_entry_t *cep, cause_t cause)
if((ret = ioctl(isdnfd, I4B_DISCONNECT_REQ, &mcr)) < 0)
{
- log(LL_ERR, "sendm_disconnect_req: ioctl I4B_DISCONNECT_REQ failed: %s", strerror(errno));
+ llog(LL_ERR, "sendm_disconnect_req: ioctl I4B_DISCONNECT_REQ failed: %s", strerror(errno));
}
else
{
- DBGL(DL_DRVR, (log(LL_DBG, "sendm_disconnect_req: sent DISCONNECT_REQ")));
+ DBGL(DL_DRVR, (llog(LL_DBG, "sendm_disconnect_req: sent DISCONNECT_REQ")));
}
return(ret);
}
@@ -1337,12 +1337,12 @@ sendm_alert_req(cfg_entry_t *cep)
if((ret = ioctl(isdnfd, I4B_ALERT_REQ, &mar)) < 0)
{
- log(LL_ERR, "sendm_alert_req: ioctl I4B_ALERT_REQ failed: %s", strerror(errno));
+ llog(LL_ERR, "sendm_alert_req: ioctl I4B_ALERT_REQ failed: %s", strerror(errno));
error_exit(1, "sendm_alert_req: ioctl I4B_ALERT_REQ failed: %s", strerror(errno));
}
else
{
- DBGL(DL_DRVR, (log(LL_DBG, "sendm_alert_req: sent ALERT_REQ")));
+ DBGL(DL_DRVR, (llog(LL_DBG, "sendm_alert_req: sent ALERT_REQ")));
}
return(ret);
}
diff --git a/usr.sbin/i4b/isdnd/process.c b/usr.sbin/i4b/isdnd/process.c
index f546043..a71048f 100644
--- a/usr.sbin/i4b/isdnd/process.c
+++ b/usr.sbin/i4b/isdnd/process.c
@@ -31,7 +31,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Mon Dec 13 21:48:19 1999]
+ * last edit-date: [Sat May 13 13:09:55 2006]
*
*---------------------------------------------------------------------------*/
@@ -57,7 +57,7 @@ check_pid(void)
if((fscanf(fp, "%d", &oldpid)) != 1)
{
- log(LL_ERR, "ERROR, reading pid from lockfile failed, terminating!");
+ llog(LL_ERR, "ERROR, reading pid from lockfile failed, terminating!");
exit(1);
}
@@ -71,7 +71,7 @@ check_pid(void)
fclose(fp);
- DBGL(DL_PROC, (log(LL_DBG, "removing old lock-file %s", PIDFILE)));
+ DBGL(DL_PROC, (llog(LL_DBG, "removing old lock-file %s", PIDFILE)));
/* remove file */
@@ -81,7 +81,7 @@ check_pid(void)
{
/* process is still alive */
- log(LL_ERR, "ERROR, another daemon is already running, pid = %d, terminating!", oldpid);
+ llog(LL_ERR, "ERROR, another daemon is already running, pid = %d, terminating!", oldpid);
exit(1);
}
}
@@ -99,13 +99,13 @@ write_pid(void)
if((fp = fopen(PIDFILE, "w")) == NULL)
{
- log(LL_ERR, "ERROR, can't open lockfile for writing, terminating");
+ llog(LL_ERR, "ERROR, can't open lockfile for writing, terminating");
do_exit(1);
}
if((fprintf(fp, "%d", (int)getpid())) == EOF)
{
- log(LL_ERR, "ERROR, can't write pid to lockfile, terminating");
+ llog(LL_ERR, "ERROR, can't write pid to lockfile, terminating");
do_exit(1);
}
@@ -125,7 +125,7 @@ daemonize(void)
switch (fork())
{
case -1: /* error */
- log(LL_ERR, "ERROR, daemonize/fork: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, daemonize/fork: %s", strerror(errno));
exit(1);
case 0: /* child */
break;
@@ -137,7 +137,7 @@ daemonize(void)
if(setsid() == -1)
{
- log(LL_ERR, "ERROR, setsid returns: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, setsid returns: %s", strerror(errno));
exit(1);
}
@@ -155,28 +155,28 @@ daemonize(void)
{
if(!isatty(fd))
{
- log(LL_ERR, "ERROR, device %s is not a tty!", rdev);
+ llog(LL_ERR, "ERROR, device %s is not a tty!", rdev);
exit(1);
}
if((dup2(fd, STDIN_FILENO)) == -1)
{
- log(LL_ERR, "ERROR, dup2 stdin: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, dup2 stdin: %s", strerror(errno));
exit(1);
}
if((dup2(fd, STDOUT_FILENO)) == -1)
{
- log(LL_ERR, "ERROR, dup2 stdout: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, dup2 stdout: %s", strerror(errno));
exit(1);
}
if((dup2(fd, STDERR_FILENO)) == -1)
{
- log(LL_ERR, "ERROR, dup2 stderr: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, dup2 stderr: %s", strerror(errno));
exit(1);
}
}
else
{
- log(LL_ERR, "ERROR, cannot open redirected device: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, cannot open redirected device: %s", strerror(errno));
exit(1);
}
@@ -184,7 +184,7 @@ daemonize(void)
{
if((close(fd)) == -1)
{
- log(LL_ERR, "ERROR, close in daemonize: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, close in daemonize: %s", strerror(errno));
exit(1);
}
}
@@ -193,7 +193,7 @@ daemonize(void)
if((ioctl(STDIN_FILENO, TIOCSCTTY, (char *)NULL)) < 0)
{
- log(LL_ERR, "ERROR, cannot setup tty as controlling terminal: %s", strerror(errno));
+ llog(LL_ERR, "ERROR, cannot setup tty as controlling terminal: %s", strerror(errno));
exit(1);
}
@@ -203,13 +203,13 @@ daemonize(void)
{
if(do_ttytype == 0)
{
- log(LL_ERR, "ERROR, no environment variable TERM found and -t not specified!");
+ llog(LL_ERR, "ERROR, no environment variable TERM found and -t not specified!");
exit(1);
}
if((setenv("TERM", ttype, 1)) != 0)
{
- log(LL_ERR, "ERROR, setenv TERM=%s failed: %s", ttype, strerror(errno));
+ llog(LL_ERR, "ERROR, setenv TERM=%s failed: %s", ttype, strerror(errno));
exit(1);
}
}
diff --git a/usr.sbin/i4b/isdnd/rates.c b/usr.sbin/i4b/isdnd/rates.c
index 29aaef4..5843f2c 100644
--- a/usr.sbin/i4b/isdnd/rates.c
+++ b/usr.sbin/i4b/isdnd/rates.c
@@ -39,7 +39,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Mon Dec 13 21:48:31 1999]
+ * last edit-date: [Sat May 13 13:10:09 2006]
*
*---------------------------------------------------------------------------*/
@@ -155,7 +155,7 @@ readrates(char *filename)
{
indx = *bp - '0';
- DBGL(DL_RATES, (log(LL_DBG, "rates: index = %d", indx)));
+ DBGL(DL_RATES, (llog(LL_DBG, "rates: index = %d", indx)));
}
else
{
@@ -355,14 +355,14 @@ readrates(char *filename)
rt = rates [j][i];
for (; rt; rt = rt->next)
{
- log(LL_DBG, "rates: index %d day %d = %d.%2.2d-%d.%2.2d:%d",
+ llog(LL_DBG, "rates: index %d day %d = %d.%2.2d-%d.%2.2d:%d",
j, i, rt->start_time/60, rt->start_time%60,
rt->end_time/60,rt->end_time%60,rt->rate);
}
}
else
{
- log(LL_DBG, "rates: NO entry for day %d !!\n", i);
+ llog(LL_DBG, "rates: NO entry for day %d !!\n", i);
}
}
}
@@ -391,14 +391,14 @@ get_current_rate(cfg_entry_t *cep, int logit)
{
case ULSRC_CMDL: /* specified on commandline */
if(logit)
- log(LL_CHD, "%05d %s rate %d sec/unit (cmdl)",
+ llog(LL_CHD, "%05d %s rate %d sec/unit (cmdl)",
cep->cdid, cep->name, unit_length);
return(unit_length);
break;
case ULSRC_CONF: /* get it from config file */
if(logit)
- log(LL_CHD, "%05d %s rate %d sec/unit (conf)",
+ llog(LL_CHD, "%05d %s rate %d sec/unit (conf)",
cep->cdid, cep->name, cep->unitlength);
return(cep->unitlength);
@@ -406,7 +406,7 @@ get_current_rate(cfg_entry_t *cep, int logit)
if(!got_rate) /* got valid rates struct ?? */
{
if(logit)
- log(LL_CHD, "%05d %s rate %d sec/unit (no ratefile)",
+ llog(LL_CHD, "%05d %s rate %d sec/unit (no ratefile)",
cep->cdid, cep->name, UNITLENGTH_DEFAULT);
return(UNITLENGTH_DEFAULT);
}
@@ -414,7 +414,7 @@ get_current_rate(cfg_entry_t *cep, int logit)
(cep->ratetype == INVALID_RATE))
{
if(logit)
- log(LL_CHD, "%05d %s rate %d sec/unit (rate out of range)",
+ llog(LL_CHD, "%05d %s rate %d sec/unit (rate out of range)",
cep->cdid, cep->name, UNITLENGTH_DEFAULT);
return(UNITLENGTH_DEFAULT);
}
@@ -422,13 +422,13 @@ get_current_rate(cfg_entry_t *cep, int logit)
if((rt = getrate(cep->ratetype)) != -1)
{
if(logit)
- log(LL_CHD, "%05d %s rate %d sec/unit (rate)",
+ llog(LL_CHD, "%05d %s rate %d sec/unit (rate)",
cep->cdid, cep->name, rt);
return(rt);
}
if(logit)
- log(LL_CHD, "%05d %s rate %d sec/unit (ratescan fail)",
+ llog(LL_CHD, "%05d %s rate %d sec/unit (ratescan fail)",
cep->cdid, cep->name, UNITLENGTH_DEFAULT);
return(UNITLENGTH_DEFAULT);
@@ -438,12 +438,12 @@ get_current_rate(cfg_entry_t *cep, int logit)
if((rt = getrate(cep->ratetype)) != -1)
{
if(logit)
- log(LL_CHD, "%05d %s rate %d sec/unit (aocd, rate)",
+ llog(LL_CHD, "%05d %s rate %d sec/unit (aocd, rate)",
cep->cdid, cep->name, rt);
return(rt);
}
if(logit)
- log(LL_CHD, "%05d %s rate %d sec/unit (aocd, default)",
+ llog(LL_CHD, "%05d %s rate %d sec/unit (aocd, default)",
cep->cdid, cep->name, UNITLENGTH_DEFAULT);
return(UNITLENGTH_DEFAULT);
@@ -451,7 +451,7 @@ get_current_rate(cfg_entry_t *cep, int logit)
default:
if(logit)
- log(LL_CHD, "%05d %s rate %d sec/unit (unitlen unknown)",
+ llog(LL_CHD, "%05d %s rate %d sec/unit (unitlen unknown)",
cep->cdid, cep->name, UNITLENGTH_DEFAULT);
return(UNITLENGTH_DEFAULT);
@@ -493,7 +493,7 @@ getrate(int rate_type )
if((time_now >= hd->start_time ) &&
(time_now < hd->end_time ))
{
- DBGL(DL_RATES, (log(LL_DBG, "rate=%d sec/unit (day=%d, beg=%d:%2.2d, end=%d:2.2d, current=%d:%2.2d)",
+ DBGL(DL_RATES, (llog(LL_DBG, "rate=%d sec/unit (day=%d, beg=%d:%2.2d, end=%d:2.2d, current=%d:%2.2d)",
hd->rate,
ptr->tm_wday,
hd->start_time/60, hd->start_time%60,
diff --git a/usr.sbin/i4b/isdnd/rc_config.c b/usr.sbin/i4b/isdnd/rc_config.c
index 6504747..6f84e21 100644
--- a/usr.sbin/i4b/isdnd/rc_config.c
+++ b/usr.sbin/i4b/isdnd/rc_config.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Sun Aug 11 12:30:49 2002]
+ * last edit-date: [Sat May 13 13:11:48 2006]
*
*---------------------------------------------------------------------------*/
@@ -77,7 +77,7 @@ configure(char *filename, int reread)
if(yyin == NULL)
{
- log(LL_ERR, "cannot fopen file [%s]", filename);
+ llog(LL_ERR, "cannot fopen file [%s]", filename);
exit(1);
}
@@ -98,7 +98,7 @@ configure(char *filename, int reread)
{
if(config_error_flag)
{
- log(LL_ERR, "there were %d error(s) in the configuration file, terminating!", config_error_flag);
+ llog(LL_ERR, "there were %d error(s) in the configuration file, terminating!", config_error_flag);
exit(1);
}
print_config();
@@ -112,7 +112,7 @@ configure(char *filename, int reread)
void
yyerror(const char *msg)
{
- log(LL_ERR, "configuration error: %s at line %d, token \"%s\"", msg, lineno+1, yytext);
+ llog(LL_ERR, "configuration error: %s at line %d, token \"%s\"", msg, lineno+1, yytext);
config_error_flag++;
}
@@ -231,7 +231,7 @@ void
cfg_set_controller_default()
{
controllercount = 0;
- DBGL(DL_RCCF, (log(LL_DBG, "[defaults, no controller section] controller %d: protocol = dss1", controllercount)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "[defaults, no controller section] controller %d: protocol = dss1", controllercount)));
isdn_ctrl_tab[controllercount].protocol = PROTOCOL_DSS1;
}
@@ -277,7 +277,7 @@ set_isppp_auth(int entry)
/* use a random AF to create the socket */
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
- log(LL_ERR, "ERROR opening control socket at line %d!", lineno);
+ llog(LL_ERR, "ERROR opening control socket at line %d!", lineno);
config_error_flag++;
return;
}
@@ -285,7 +285,7 @@ set_isppp_auth(int entry)
ifr.ifr_data = (caddr_t)&spr;
if (ioctl(s, SIOCGIFGENERIC, &ifr) == -1) {
- log(LL_ERR, "ERROR fetching active PPP authentication info for %s at line %d!", ifr.ifr_name, lineno);
+ llog(LL_ERR, "ERROR fetching active PPP authentication info for %s at line %d!", ifr.ifr_name, lineno);
close(s);
config_error_flag++;
return;
@@ -336,7 +336,7 @@ set_isppp_auth(int entry)
spr.cmd = (int)SPPPIOSDEFS;
if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1) {
- log(LL_ERR, "ERROR setting new PPP authentication parameters for %s at line %d!", ifr.ifr_name, lineno);
+ llog(LL_ERR, "ERROR setting new PPP authentication parameters for %s at line %d!", ifr.ifr_name, lineno);
config_error_flag++;
}
close(s);
@@ -354,70 +354,70 @@ cfg_setval(int keyword)
{
case ACCTALL:
acct_all = yylval.booln;
- DBGL(DL_RCCF, (log(LL_DBG, "system: acctall = %d", yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: acctall = %d", yylval.booln)));
break;
case ACCTFILE:
strcpy(acctfile, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "system: acctfile = %s", yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: acctfile = %s", yylval.str)));
break;
case ADDPREFIX:
addprefix = yylval.booln;
- DBGL(DL_RCCF, (log(LL_DBG, "system: add-prefix = %d", yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: add-prefix = %d", yylval.booln)));
break;
case ALERT:
if(yylval.num < MINALERT)
{
yylval.num = MINALERT;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: alert < %d, min = %d", entrycount, MINALERT, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: alert < %d, min = %d", entrycount, MINALERT, yylval.num)));
}
else if(yylval.num > MAXALERT)
{
yylval.num = MAXALERT;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: alert > %d, min = %d", entrycount, MAXALERT, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: alert > %d, min = %d", entrycount, MAXALERT, yylval.num)));
}
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: alert = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: alert = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].alert = yylval.num;
break;
case ALIASING:
- DBGL(DL_RCCF, (log(LL_DBG, "system: aliasing = %d", yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: aliasing = %d", yylval.booln)));
aliasing = yylval.booln;
break;
case ALIASFNAME:
strcpy(aliasfile, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "system: aliasfile = %s", yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: aliasfile = %s", yylval.str)));
break;
case ANSWERPROG:
if((cfg_entry_tab[entrycount].answerprog = malloc(strlen(yylval.str)+1)) == NULL)
{
- log(LL_ERR, "entry %d: answerstring, malloc failed!", entrycount);
+ llog(LL_ERR, "entry %d: answerstring, malloc failed!", entrycount);
do_exit(1);
}
strcpy(cfg_entry_tab[entrycount].answerprog, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: answerprog = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: answerprog = %s", entrycount, yylval.str)));
break;
case B1PROTOCOL:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: b1protocol = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: b1protocol = %s", entrycount, yylval.str)));
if(!(strcmp(yylval.str, "raw")))
cfg_entry_tab[entrycount].b1protocol = BPROT_NONE;
else if(!(strcmp(yylval.str, "hdlc")))
cfg_entry_tab[entrycount].b1protocol = BPROT_RHDLC;
else
{
- log(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"b1protocol\" at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"b1protocol\" at line %d!", lineno);
config_error_flag++;
}
break;
case BCAP:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: bcap = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: bcap = %s", entrycount, yylval.str)));
cfg_entry_tab[entrycount].bcap = BCAP_NONE;
if(!(strcmp(yylval.str, "dov")))
cfg_entry_tab[entrycount].bcap = BCAP_DOV;
@@ -425,32 +425,32 @@ cfg_setval(int keyword)
case BEEPCONNECT:
do_bell = yylval.booln;
- DBGL(DL_RCCF, (log(LL_DBG, "system: beepconnect = %d", yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: beepconnect = %d", yylval.booln)));
break;
case BUDGETCALLBACKPERIOD:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: budget-callbackperiod = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: budget-callbackperiod = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].budget_callbackperiod = yylval.num;
break;
case BUDGETCALLBACKNCALLS:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: budget-callbackncalls = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: budget-callbackncalls = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].budget_callbackncalls = yylval.num;
break;
case BUDGETCALLOUTPERIOD:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: budget-calloutperiod = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: budget-calloutperiod = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].budget_calloutperiod = yylval.num;
break;
case BUDGETCALLOUTNCALLS:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: budget-calloutncalls = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: budget-calloutncalls = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].budget_calloutncalls = yylval.num;
break;
case BUDGETCALLBACKSFILEROTATE:
cfg_entry_tab[entrycount].budget_callbacksfile_rotate = yylval.booln;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: budget-callbacksfile-rotate = %d", entrycount, yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: budget-callbacksfile-rotate = %d", entrycount, yylval.booln)));
break;
case BUDGETCALLBACKSFILE:
@@ -458,13 +458,13 @@ cfg_setval(int keyword)
FILE *fp;
int s, l;
int n;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: budget-callbacksfile = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: budget-callbacksfile = %s", entrycount, yylval.str)));
fp = fopen(yylval.str, "r");
if(fp != NULL)
{
if((fscanf(fp, "%d %d %d", (int *)&s, (int *)&l, &n)) != 3)
{
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: initializing budget-callbacksfile %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: initializing budget-callbacksfile %s", entrycount, yylval.str)));
fclose(fp);
fp = fopen(yylval.str, "w");
if(fp != NULL)
@@ -476,7 +476,7 @@ cfg_setval(int keyword)
}
else
{
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: creating budget-callbacksfile %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: creating budget-callbacksfile %s", entrycount, yylval.str)));
fp = fopen(yylval.str, "w");
if(fp != NULL)
{
@@ -492,11 +492,11 @@ cfg_setval(int keyword)
{
if((cfg_entry_tab[entrycount].budget_callbacks_file = malloc(strlen(yylval.str)+1)) == NULL)
{
- log(LL_ERR, "entry %d: budget-callbacksfile, malloc failed!", entrycount);
+ llog(LL_ERR, "entry %d: budget-callbacksfile, malloc failed!", entrycount);
do_exit(1);
}
strcpy(cfg_entry_tab[entrycount].budget_callbacks_file, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: using callbacksfile %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: using callbacksfile %s", entrycount, yylval.str)));
}
fclose(fp);
}
@@ -505,7 +505,7 @@ cfg_setval(int keyword)
case BUDGETCALLOUTSFILEROTATE:
cfg_entry_tab[entrycount].budget_calloutsfile_rotate = yylval.booln;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: budget-calloutsfile-rotate = %d", entrycount, yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: budget-calloutsfile-rotate = %d", entrycount, yylval.booln)));
break;
case BUDGETCALLOUTSFILE:
@@ -513,13 +513,13 @@ cfg_setval(int keyword)
FILE *fp;
int s, l;
int n;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: budget-calloutsfile = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: budget-calloutsfile = %s", entrycount, yylval.str)));
fp = fopen(yylval.str, "r");
if(fp != NULL)
{
if((fscanf(fp, "%d %d %d", (int *)&s, (int *)&l, &n)) != 3)
{
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: initializing budget-calloutsfile %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: initializing budget-calloutsfile %s", entrycount, yylval.str)));
fclose(fp);
fp = fopen(yylval.str, "w");
if(fp != NULL)
@@ -531,7 +531,7 @@ cfg_setval(int keyword)
}
else
{
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: creating budget-calloutsfile %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: creating budget-calloutsfile %s", entrycount, yylval.str)));
fp = fopen(yylval.str, "w");
if(fp != NULL)
{
@@ -547,11 +547,11 @@ cfg_setval(int keyword)
{
if((cfg_entry_tab[entrycount].budget_callouts_file = malloc(strlen(yylval.str)+1)) == NULL)
{
- log(LL_ERR, "entry %d: budget-calloutsfile, malloc failed!", entrycount);
+ llog(LL_ERR, "entry %d: budget-calloutsfile, malloc failed!", entrycount);
do_exit(1);
}
strcpy(cfg_entry_tab[entrycount].budget_callouts_file, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: using calloutsfile %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: using calloutsfile %s", entrycount, yylval.str)));
}
fclose(fp);
}
@@ -562,10 +562,10 @@ cfg_setval(int keyword)
if(yylval.num < CALLBACKWAIT_MIN)
{
yylval.num = CALLBACKWAIT_MIN;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: callbackwait < %d, min = %d", entrycount, CALLBACKWAIT_MIN, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: callbackwait < %d, min = %d", entrycount, CALLBACKWAIT_MIN, yylval.num)));
}
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: callbackwait = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: callbackwait = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].callbackwait = yylval.num;
break;
@@ -573,10 +573,10 @@ cfg_setval(int keyword)
if(yylval.num < CALLEDBACKWAIT_MIN)
{
yylval.num = CALLEDBACKWAIT_MIN;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: calledbackwait < %d, min = %d", entrycount, CALLEDBACKWAIT_MIN, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: calledbackwait < %d, min = %d", entrycount, CALLEDBACKWAIT_MIN, yylval.num)));
}
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: calledbackwait = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: calledbackwait = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].calledbackwait = yylval.num;
break;
@@ -595,11 +595,11 @@ cfg_setval(int keyword)
if (!strcmp(cfg_entry_tab[i].name, yylval.str))
break;
if (i == entrycount) {
- log(LL_ERR, "entry %d: clone, unknown entry %s!", entrycount, yylval.str);
+ llog(LL_ERR, "entry %d: clone, unknown entry %s!", entrycount, yylval.str);
do_exit(1);
}
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: clone = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: clone = %s", entrycount, yylval.str)));
memcpy(&cfg_entry_tab[entrycount], &cfg_entry_tab[i],
sizeof(cfg_entry_tab[0]));
@@ -619,38 +619,38 @@ cfg_setval(int keyword)
case CONNECTPROG:
if((cfg_entry_tab[entrycount].connectprog = malloc(strlen(yylval.str)+1)) == NULL)
{
- log(LL_ERR, "entry %d: connectprog, malloc failed!", entrycount);
+ llog(LL_ERR, "entry %d: connectprog, malloc failed!", entrycount);
do_exit(1);
}
strcpy(cfg_entry_tab[entrycount].connectprog, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: connectprog = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: connectprog = %s", entrycount, yylval.str)));
break;
case DIALOUTTYPE:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: dialouttype = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: dialouttype = %s", entrycount, yylval.str)));
if(!(strcmp(yylval.str, "normal")))
cfg_entry_tab[entrycount].dialouttype = DIALOUT_NORMAL;
else if(!(strcmp(yylval.str, "calledback")))
cfg_entry_tab[entrycount].dialouttype = DIALOUT_CALLEDBACK;
else
{
- log(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"dialout-type\" at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"dialout-type\" at line %d!", lineno);
config_error_flag++;
}
break;
case DIALRETRIES:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: dialretries = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: dialretries = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].dialretries = yylval.num;
break;
case DIALRANDINCR:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: dialrandincr = %d", entrycount, yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: dialrandincr = %d", entrycount, yylval.booln)));
cfg_entry_tab[entrycount].dialrandincr = yylval.booln;
break;
case DIRECTION:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: direction = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: direction = %s", entrycount, yylval.str)));
if(!(strcmp(yylval.str, "inout")))
cfg_entry_tab[entrycount].inout = DIR_INOUT;
@@ -660,7 +660,7 @@ cfg_setval(int keyword)
cfg_entry_tab[entrycount].inout = DIR_OUTONLY;
else
{
- log(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"direction\" at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"direction\" at line %d!", lineno);
config_error_flag++;
}
break;
@@ -668,11 +668,11 @@ cfg_setval(int keyword)
case DISCONNECTPROG:
if((cfg_entry_tab[entrycount].disconnectprog = malloc(strlen(yylval.str)+1)) == NULL)
{
- log(LL_ERR, "entry %d: disconnectprog, malloc failed!", entrycount);
+ llog(LL_ERR, "entry %d: disconnectprog, malloc failed!", entrycount);
do_exit(1);
}
strcpy(cfg_entry_tab[entrycount].disconnectprog, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: disconnectprog = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: disconnectprog = %s", entrycount, yylval.str)));
break;
case DOWNTRIES:
@@ -681,7 +681,7 @@ cfg_setval(int keyword)
else if(yylval.num < DOWN_TRIES_MIN)
yylval.num = DOWN_TRIES_MIN;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: downtries = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: downtries = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].downtries = yylval.num;
break;
@@ -691,32 +691,32 @@ cfg_setval(int keyword)
else if(yylval.num < DOWN_TIME_MIN)
yylval.num = DOWN_TIME_MIN;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: downtime = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: downtime = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].downtime = yylval.num;
break;
case EARLYHANGUP:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: earlyhangup = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: earlyhangup = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].earlyhangup = yylval.num;
break;
case EXTCALLATTR:
- DBGL(DL_RCCF, (log(LL_DBG, "system: extcallattr = %d", yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: extcallattr = %d", yylval.booln)));
extcallattr = yylval.booln;
break;
case FIRMWARE:
- DBGL(DL_RCCF, (log(LL_DBG, "controller %d: firmware = %s", controllercount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "controller %d: firmware = %s", controllercount, yylval.str)));
isdn_ctrl_tab[controllercount].firmware = strdup(yylval.str);
break;
case HOLIDAYFILE:
strcpy(holidayfile, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "system: holidayfile = %s", yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: holidayfile = %s", yylval.str)));
break;
case IDLE_ALG_OUT:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: idle-algorithm-outgoing = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: idle-algorithm-outgoing = %s", entrycount, yylval.str)));
if(!(strcmp(yylval.str, "fix-unit-size")))
{
@@ -728,119 +728,119 @@ cfg_setval(int keyword)
}
else
{
- log(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"idle-algorithm-outgoing\" at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"idle-algorithm-outgoing\" at line %d!", lineno);
config_error_flag++;
}
break;
case IDLETIME_IN:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: idle_time_in = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: idle_time_in = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].idle_time_in = yylval.num;
break;
case IDLETIME_OUT:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: idle_time_out = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: idle_time_out = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].idle_time_out = yylval.num;
break;
case ISDNCONTROLLER:
cfg_entry_tab[entrycount].isdncontroller = yylval.num;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: isdncontroller = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: isdncontroller = %d", entrycount, yylval.num)));
break;
case ISDNCHANNEL:
if (yylval.num == 0 || yylval.num == -1)
{
cfg_entry_tab[entrycount].isdnchannel = CHAN_ANY;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: isdnchannel = any", entrycount)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: isdnchannel = any", entrycount)));
}
else if (yylval.num > MAX_BCHAN)
{
- log(LL_DBG, "entry %d: isdnchannel value out of range", entrycount);
+ llog(LL_DBG, "entry %d: isdnchannel value out of range", entrycount);
config_error_flag++;
}
else
{
cfg_entry_tab[entrycount].isdnchannel = yylval.num-1;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: isdnchannel = B%d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: isdnchannel = B%d", entrycount, yylval.num)));
}
break;
case ISDNTIME:
- DBGL(DL_RCCF, (log(LL_DBG, "system: isdntime = %d", yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: isdntime = %d", yylval.booln)));
isdntime = yylval.booln;
break;
case ISDNTXDELIN:
cfg_entry_tab[entrycount].isdntxdelin = yylval.num;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: isdntxdel-incoming = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: isdntxdel-incoming = %d", entrycount, yylval.num)));
break;
case ISDNTXDELOUT:
cfg_entry_tab[entrycount].isdntxdelout = yylval.num;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: isdntxdel-outgoing = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: isdntxdel-outgoing = %d", entrycount, yylval.num)));
break;
case LOCAL_PHONE_DIALOUT:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: local_phone_dialout = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: local_phone_dialout = %s", entrycount, yylval.str)));
strcpy(cfg_entry_tab[entrycount].local_phone_dialout.number, yylval.str);
break;
case LOCAL_SUBADDR_DIALOUT:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: local_subaddr_dialout = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: local_subaddr_dialout = %s", entrycount, yylval.str)));
strcpy(cfg_entry_tab[entrycount].local_phone_dialout.subaddr, yylval.str);
break;
case LOCAL_PHONE_INCOMING:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: local_phone_incoming = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: local_phone_incoming = %s", entrycount, yylval.str)));
strcpy(cfg_entry_tab[entrycount].local_phone_incoming.number, yylval.str);
break;
case LOCAL_SUBADDR_INCOMING:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: local_subaddr_incoming = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: local_subaddr_incoming = %s", entrycount, yylval.str)));
strcpy(cfg_entry_tab[entrycount].local_phone_incoming.subaddr, yylval.str);
break;
case MAILER:
strcpy(mailer, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "system: mailer = %s", yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: mailer = %s", yylval.str)));
break;
case MAILTO:
strcpy(mailto, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "system: mailto = %s", yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: mailto = %s", yylval.str)));
break;
case MAXCONNECTTIME:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: maxconnecttime = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: maxconnecttime = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].maxconnecttime = yylval.num;
break;
case MONITORPORT:
monitorport = yylval.num;
- DBGL(DL_RCCF, (log(LL_DBG, "system: monitorport = %d", yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: monitorport = %d", yylval.num)));
break;
case MONITORSW:
if (yylval.booln && inhibit_monitor)
{
do_monitor = 0;
- DBGL(DL_RCCF, (log(LL_DBG, "system: monitor-enable overriden by command line flag")));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: monitor-enable overriden by command line flag")));
}
else
{
do_monitor = yylval.booln;
- DBGL(DL_RCCF, (log(LL_DBG, "system: monitor-enable = %d", yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: monitor-enable = %d", yylval.booln)));
}
break;
case NAME:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: name = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: name = %s", entrycount, yylval.str)));
strcpy(cfg_entry_tab[entrycount].name, yylval.str);
break;
case PPP_AUTH_RECHALLENGE:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: ppp-auth-rechallenge = %d", entrycount, yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: ppp-auth-rechallenge = %d", entrycount, yylval.booln)));
if(yylval.booln)
cfg_entry_tab[entrycount].ppp_auth_flags |= AUTH_RECHALLENGE;
else
@@ -849,7 +849,7 @@ cfg_setval(int keyword)
break;
case PPP_AUTH_PARANOID:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: ppp-auth-paranoid = %d", entrycount, yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: ppp-auth-paranoid = %d", entrycount, yylval.booln)));
if(yylval.booln)
cfg_entry_tab[entrycount].ppp_auth_flags |= AUTH_REQUIRED;
else
@@ -858,7 +858,7 @@ cfg_setval(int keyword)
break;
case PPP_EXPECT_AUTH:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: ppp-expect-auth = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: ppp-expect-auth = %s", entrycount, yylval.str)));
if(!(strcmp(yylval.str, "none")))
cfg_entry_tab[entrycount].ppp_expect_auth = AUTH_NONE;
else if(!(strcmp(yylval.str, "pap")))
@@ -867,7 +867,7 @@ cfg_setval(int keyword)
cfg_entry_tab[entrycount].ppp_expect_auth = AUTH_CHAP;
else
{
- log(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"ppp-expect-auth\" at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"ppp-expect-auth\" at line %d!", lineno);
config_error_flag++;
break;
}
@@ -875,19 +875,19 @@ cfg_setval(int keyword)
break;
case PPP_EXPECT_NAME:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: ppp-expect-name = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: ppp-expect-name = %s", entrycount, yylval.str)));
strncpy(cfg_entry_tab[entrycount].ppp_expect_name, yylval.str, sizeof(cfg_entry_tab[entrycount].ppp_expect_name) -1);
set_isppp_auth(entrycount);
break;
case PPP_EXPECT_PASSWORD:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: ppp-expect-password = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: ppp-expect-password = %s", entrycount, yylval.str)));
strncpy(cfg_entry_tab[entrycount].ppp_expect_password, yylval.str, sizeof(cfg_entry_tab[entrycount].ppp_expect_password) -1);
set_isppp_auth(entrycount);
break;
case PPP_SEND_AUTH:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: ppp-send-auth = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: ppp-send-auth = %s", entrycount, yylval.str)));
if(!(strcmp(yylval.str, "none")))
cfg_entry_tab[entrycount].ppp_send_auth = AUTH_NONE;
else if(!(strcmp(yylval.str, "pap")))
@@ -896,7 +896,7 @@ cfg_setval(int keyword)
cfg_entry_tab[entrycount].ppp_send_auth = AUTH_CHAP;
else
{
- log(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"ppp-send-auth\" at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"ppp-send-auth\" at line %d!", lineno);
config_error_flag++;
break;
}
@@ -904,42 +904,42 @@ cfg_setval(int keyword)
break;
case PPP_SEND_NAME:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: ppp-send-name = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: ppp-send-name = %s", entrycount, yylval.str)));
strncpy(cfg_entry_tab[entrycount].ppp_send_name, yylval.str, sizeof(cfg_entry_tab[entrycount].ppp_send_name) -1);
set_isppp_auth(entrycount);
break;
case PPP_SEND_PASSWORD:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: ppp-send-password = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: ppp-send-password = %s", entrycount, yylval.str)));
strncpy(cfg_entry_tab[entrycount].ppp_send_password, yylval.str, sizeof(cfg_entry_tab[entrycount].ppp_send_password) -1);
set_isppp_auth(entrycount);
break;
case PREFIXINTERNATIONAL:
strncpy(prefixinternational, yylval.str, sizeof(prefixinternational)-1);
- DBGL(DL_RCCF, (log(LL_DBG, "system: prefix-international = %s", prefixinternational)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: prefix-international = %s", prefixinternational)));
break;
case PREFIXNATIONAL:
strncpy(prefixnational, yylval.str, sizeof(prefixnational)-1);
- DBGL(DL_RCCF, (log(LL_DBG, "system: prefix-national = %s", prefixnational)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: prefix-national = %s", prefixnational)));
break;
case PROTOCOL:
- DBGL(DL_RCCF, (log(LL_DBG, "controller %d: protocol = %s", controllercount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "controller %d: protocol = %s", controllercount, yylval.str)));
if(!(strcmp(yylval.str, "dss1")))
isdn_ctrl_tab[controllercount].protocol = PROTOCOL_DSS1;
else if(!(strcmp(yylval.str, "d64s")))
isdn_ctrl_tab[controllercount].protocol = PROTOCOL_D64S;
else
{
- log(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"protocol\" at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"protocol\" at line %d!", lineno);
config_error_flag++;
}
break;
case REACTION:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: dialin_reaction = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: dialin_reaction = %s", entrycount, yylval.str)));
if(!(strcmp(yylval.str, "accept")))
cfg_entry_tab[entrycount].dialin_reaction = REACT_ACCEPT;
else if(!(strcmp(yylval.str, "reject")))
@@ -952,7 +952,7 @@ cfg_setval(int keyword)
cfg_entry_tab[entrycount].dialin_reaction = REACT_CALLBACK;
else
{
- log(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"dialin_reaction\" at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"dialin_reaction\" at line %d!", lineno);
config_error_flag++;
}
break;
@@ -960,12 +960,12 @@ cfg_setval(int keyword)
case REMOTE_PHONE_DIALOUT:
if(cfg_entry_tab[entrycount].remote_numbers_count >= MAXRNUMBERS)
{
- log(LL_ERR, "ERROR parsing config file: too many remote numbers at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: too many remote numbers at line %d!", lineno);
config_error_flag++;
break;
}
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: remote_phone_dialout #%d = %s",
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: remote_phone_dialout #%d = %s",
entrycount, cfg_entry_tab[entrycount].remote_numbers_count, yylval.str)));
strcpy(cfg_entry_tab[entrycount].remote_numbers[cfg_entry_tab[entrycount].remote_numbers_count].number, yylval.str);
@@ -978,12 +978,12 @@ cfg_setval(int keyword)
case REMOTE_SUBADDR_DIALOUT:
if(cfg_entry_tab[entrycount].remote_subaddr_count >= MAXRNUMBERS)
{
- log(LL_ERR, "ERROR parsing config file: too many remote subaddresses at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: too many remote subaddresses at line %d!", lineno);
config_error_flag++;
break;
}
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: remote_subaddr_dialout #%d = %s",
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: remote_subaddr_dialout #%d = %s",
entrycount, cfg_entry_tab[entrycount].remote_numbers_count, yylval.str)));
strcpy(cfg_entry_tab[entrycount].remote_numbers[cfg_entry_tab[entrycount].remote_numbers_count].subaddr, yylval.str);
@@ -991,7 +991,7 @@ cfg_setval(int keyword)
break;
case REMOTE_NUMBERS_HANDLING:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: remdial_handling = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: remdial_handling = %s", entrycount, yylval.str)));
if(!(strcmp(yylval.str, "next")))
cfg_entry_tab[entrycount].remote_numbers_handling = RNH_NEXT;
else if(!(strcmp(yylval.str, "last")))
@@ -1000,7 +1000,7 @@ cfg_setval(int keyword)
cfg_entry_tab[entrycount].remote_numbers_handling = RNH_FIRST;
else
{
- log(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"remdial_handling\" at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"remdial_handling\" at line %d!", lineno);
config_error_flag++;
}
break;
@@ -1011,11 +1011,11 @@ cfg_setval(int keyword)
n = cfg_entry_tab[entrycount].incoming_numbers_count;
if (n >= MAX_INCOMING)
{
- log(LL_ERR, "ERROR parsing config file: too many \"remote_phone_incoming\" entries at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: too many \"remote_phone_incoming\" entries at line %d!", lineno);
config_error_flag++;
break;
}
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: remote_phone_incoming #%d = %s", entrycount, n, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: remote_phone_incoming #%d = %s", entrycount, n, yylval.str)));
strcpy(cfg_entry_tab[entrycount].remote_phone_incoming[n].number, yylval.str);
cfg_entry_tab[entrycount].incoming_numbers_count++;
}
@@ -1027,22 +1027,22 @@ cfg_setval(int keyword)
n = cfg_entry_tab[entrycount].incoming_numbers_count;
if (n >= MAX_INCOMING)
{
- log(LL_ERR, "ERROR parsing config file: too many \"remote_subaddr_incoming\" entries at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: too many \"remote_subaddr_incoming\" entries at line %d!", lineno);
config_error_flag++;
break;
}
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: remote_subaddr_incoming #%d = %s", entrycount, n, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: remote_subaddr_incoming #%d = %s", entrycount, n, yylval.str)));
strcpy(cfg_entry_tab[entrycount].remote_phone_incoming[n].subaddr, yylval.str);
}
break;
case RATESFILE:
strcpy(ratesfile, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "system: ratesfile = %s", yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: ratesfile = %s", yylval.str)));
break;
case RATETYPE:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: ratetype = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: ratetype = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].ratetype = yylval.num;
break;
@@ -1050,17 +1050,17 @@ cfg_setval(int keyword)
if(yylval.num < RECOVERYTIME_MIN)
{
yylval.num = RECOVERYTIME_MIN;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: recoverytime < %d, min = %d", entrycount, RECOVERYTIME_MIN, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: recoverytime < %d, min = %d", entrycount, RECOVERYTIME_MIN, yylval.num)));
}
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: recoverytime = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: recoverytime = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].recoverytime = yylval.num;
break;
case REGEXPR:
if(nregexpr >= MAX_RE)
{
- log(LL_ERR, "system: regexpr #%d >= MAX_RE", nregexpr);
+ llog(LL_ERR, "system: regexpr #%d >= MAX_RE", nregexpr);
config_error_flag++;
break;
}
@@ -1069,7 +1069,7 @@ cfg_setval(int keyword)
{
char buf[256];
regerror(i, &(rarr[nregexpr].re), buf, sizeof(buf));
- log(LL_ERR, "system: regcomp error for %s: [%s]", yylval.str, buf);
+ llog(LL_ERR, "system: regcomp error for %s: [%s]", yylval.str, buf);
config_error_flag++;
break;
}
@@ -1077,13 +1077,13 @@ cfg_setval(int keyword)
{
if((rarr[nregexpr].re_expr = malloc(strlen(yylval.str)+1)) == NULL)
{
- log(LL_ERR, "system: regexpr malloc error error for %s", yylval.str);
+ llog(LL_ERR, "system: regexpr malloc error error for %s", yylval.str);
config_error_flag++;
break;
}
strcpy(rarr[nregexpr].re_expr, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "system: regexpr %s stored into slot %d", yylval.str, nregexpr)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: regexpr %s stored into slot %d", yylval.str, nregexpr)));
if(rarr[nregexpr].re_prog != NULL)
rarr[nregexpr].re_flg = 1;
@@ -1096,19 +1096,19 @@ cfg_setval(int keyword)
case REGPROG:
if(nregprog >= MAX_RE)
{
- log(LL_ERR, "system: regprog #%d >= MAX_RE", nregprog);
+ llog(LL_ERR, "system: regprog #%d >= MAX_RE", nregprog);
config_error_flag++;
break;
}
if((rarr[nregprog].re_prog = malloc(strlen(yylval.str)+1)) == NULL)
{
- log(LL_ERR, "system: regprog malloc error error for %s", yylval.str);
+ llog(LL_ERR, "system: regprog malloc error error for %s", yylval.str);
config_error_flag++;
break;
}
strcpy(rarr[nregprog].re_prog, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "system: regprog %s stored into slot %d", yylval.str, nregprog)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: regprog %s stored into slot %d", yylval.str, nregprog)));
if(rarr[nregprog].re_expr != NULL)
rarr[nregprog].re_flg = 1;
@@ -1118,7 +1118,7 @@ cfg_setval(int keyword)
case ROTATESUFFIX:
strcpy(rotatesuffix, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "system: rotatesuffix = %s", yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: rotatesuffix = %s", yylval.str)));
break;
case RTPRIO:
@@ -1127,11 +1127,11 @@ cfg_setval(int keyword)
if(rt_prio < RTP_PRIO_MIN || rt_prio > RTP_PRIO_MAX)
{
config_error_flag++;
- log(LL_ERR, "system: error, rtprio (%d) out of range!", yylval.num);
+ llog(LL_ERR, "system: error, rtprio (%d) out of range!", yylval.num);
}
else
{
- DBGL(DL_RCCF, (log(LL_DBG, "system: rtprio = %d", yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: rtprio = %d", yylval.num)));
}
#else
rt_prio = RTPRIO_NOTUSED;
@@ -1140,16 +1140,16 @@ cfg_setval(int keyword)
case TINAINITPROG:
strcpy(tinainitprog, yylval.str);
- DBGL(DL_RCCF, (log(LL_DBG, "system: tinainitprog = %s", yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: tinainitprog = %s", yylval.str)));
break;
case UNITLENGTH:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: unitlength = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: unitlength = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].unitlength = yylval.num;
break;
case UNITLENGTHSRC:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: unitlengthsrc = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: unitlengthsrc = %s", entrycount, yylval.str)));
if(!(strcmp(yylval.str, "none")))
cfg_entry_tab[entrycount].unitlengthsrc = ULSRC_NONE;
else if(!(strcmp(yylval.str, "cmdl")))
@@ -1162,13 +1162,13 @@ cfg_setval(int keyword)
cfg_entry_tab[entrycount].unitlengthsrc = ULSRC_DYN;
else
{
- log(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"unitlengthsrc\" at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"unitlengthsrc\" at line %d!", lineno);
config_error_flag++;
}
break;
case USRDEVICENAME:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: usrdevicename = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: usrdevicename = %s", entrycount, yylval.str)));
if(!strcmp(yylval.str, "rbch"))
cfg_entry_tab[entrycount].usrdevicename = BDRV_RBCH;
else if(!strcmp(yylval.str, "tel"))
@@ -1185,38 +1185,38 @@ cfg_setval(int keyword)
cfg_entry_tab[entrycount].usrdevicename = BDRV_ING;
else
{
- log(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"usrdevicename\" at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown parameter for keyword \"usrdevicename\" at line %d!", lineno);
config_error_flag++;
}
break;
case USRDEVICEUNIT:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: usrdeviceunit = %d", entrycount, yylval.num)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: usrdeviceunit = %d", entrycount, yylval.num)));
cfg_entry_tab[entrycount].usrdeviceunit = yylval.num;
break;
case USEACCTFILE:
useacctfile = yylval.booln;
- DBGL(DL_RCCF, (log(LL_DBG, "system: useacctfile = %d", yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "system: useacctfile = %d", yylval.booln)));
break;
case USESUBADDR:
cfg_entry_tab[entrycount].usesubaddr = yylval.booln;
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: usesubaddr = %d", entrycount, yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: usesubaddr = %d", entrycount, yylval.booln)));
break;
case USEDOWN:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: usedown = %d", entrycount, yylval.booln)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: usedown = %d", entrycount, yylval.booln)));
cfg_entry_tab[entrycount].usedown = yylval.booln;
break;
case VALID:
- DBGL(DL_RCCF, (log(LL_DBG, "entry %d: valid = %s", entrycount, yylval.str)));
+ DBGL(DL_RCCF, (llog(LL_DBG, "entry %d: valid = %s", entrycount, yylval.str)));
parse_valid(entrycount, yylval.str);
break;
default:
- log(LL_ERR, "ERROR parsing config file: unknown keyword at line %d!", lineno);
+ llog(LL_ERR, "ERROR parsing config file: unknown keyword at line %d!", lineno);
config_error_flag++;
break;
}
@@ -1256,7 +1256,7 @@ parse_valid(int entrycount, char *dt)
ret = sscanf(dt, "%d:%d-%d:%d", &fromhr, &frommin, &tohr, &tomin);
if(ret !=4)
{
- log(LL_ERR, "ERROR parsing config file: timespec [%s] error at line %d!", *dt, lineno);
+ llog(LL_ERR, "ERROR parsing config file: timespec [%s] error at line %d!", *dt, lineno);
config_error_flag++;
return;
}
@@ -1264,7 +1264,7 @@ parse_valid(int entrycount, char *dt)
if(fromhr < 0 || fromhr > 24 || tohr < 0 || tohr > 24 ||
frommin < 0 || frommin > 59 || tomin < 0 || tomin > 59)
{
- log(LL_ERR, "ERROR parsing config file: invalid time [%s] at line %d!", *dt, lineno);
+ llog(LL_ERR, "ERROR parsing config file: invalid time [%s] at line %d!", *dt, lineno);
config_error_flag++;
return;
}
@@ -1291,7 +1291,7 @@ parse_valid(int entrycount, char *dt)
else
{
/* dt points to illegal character */
- log(LL_ERR, "ERROR parsing config file: illegal character [%c=0x%x] in date/time spec at line %d!", *dt, *dt, lineno);
+ llog(LL_ERR, "ERROR parsing config file: illegal character [%c=0x%x] in date/time spec at line %d!", *dt, *dt, lineno);
config_error_flag++;
return;
}
@@ -1319,12 +1319,12 @@ check_config(void)
{
if((rarr[i].re_expr != NULL) && (rarr[i].re_prog == NULL))
{
- log(LL_ERR, "check_config: regular expression %d without program!", i);
+ llog(LL_ERR, "check_config: regular expression %d without program!", i);
error++;
}
if((rarr[i].re_prog != NULL) && (rarr[i].re_expr == NULL))
{
- log(LL_ERR, "check_config: regular expression program %d without expression!", i);
+ llog(LL_ERR, "check_config: regular expression program %d without expression!", i);
error++;
}
}
@@ -1337,7 +1337,7 @@ check_config(void)
if((cep->isdncontroller < -1) || (cep->isdncontroller > (ncontroller-1)))
{
- log(LL_ERR, "check_config: WARNING, isdncontroller out of range in entry %d!", i);
+ llog(LL_ERR, "check_config: WARNING, isdncontroller out of range in entry %d!", i);
}
/* numbers used for dialout */
@@ -1346,12 +1346,12 @@ check_config(void)
{
if(cep->remote_numbers_count == 0)
{
- log(LL_ERR, "check_config: remote-phone-dialout not set in entry %d!", i);
+ llog(LL_ERR, "check_config: remote-phone-dialout not set in entry %d!", i);
error++;
}
if(strlen(cep->local_phone_dialout.number) == 0)
{
- log(LL_ERR, "check_config: local-phone-dialout not set in entry %d!", i);
+ llog(LL_ERR, "check_config: local-phone-dialout not set in entry %d!", i);
error++;
}
}
@@ -1362,19 +1362,19 @@ check_config(void)
{
if(strlen(cep->local_phone_incoming.number) == 0)
{
- log(LL_ERR, "check_config: local-phone-incoming not set in entry %d!", i);
+ llog(LL_ERR, "check_config: local-phone-incoming not set in entry %d!", i);
error++;
}
if(cep->incoming_numbers_count == 0)
{
- log(LL_ERR, "check_config: remote-phone-incoming not set in entry %d!", i);
+ llog(LL_ERR, "check_config: remote-phone-incoming not set in entry %d!", i);
error++;
}
}
if((cep->dialin_reaction == REACT_ANSWER) && (cep->b1protocol != BPROT_NONE))
{
- log(LL_ERR, "check_config: b1protocol not raw for telephony in entry %d!", i);
+ llog(LL_ERR, "check_config: b1protocol not raw for telephony in entry %d!", i);
error++;
}
@@ -1382,12 +1382,12 @@ check_config(void)
{
if(cep->ppp_send_name[0] == 0)
{
- log(LL_ERR, "check_config: no remote authentification name in entry %d!", i);
+ llog(LL_ERR, "check_config: no remote authentification name in entry %d!", i);
error++;
}
if(cep->ppp_send_password[0] == 0)
{
- log(LL_ERR, "check_config: no remote authentification password in entry %d!", i);
+ llog(LL_ERR, "check_config: no remote authentification password in entry %d!", i);
error++;
}
}
@@ -1395,19 +1395,19 @@ check_config(void)
{
if(cep->ppp_expect_name[0] == 0)
{
- log(LL_ERR, "check_config: no local authentification name in entry %d!", i);
+ llog(LL_ERR, "check_config: no local authentification name in entry %d!", i);
error++;
}
if(cep->ppp_expect_password[0] == 0)
{
- log(LL_ERR, "check_config: no local authentification secret in entry %d!", i);
+ llog(LL_ERR, "check_config: no local authentification secret in entry %d!", i);
error++;
}
}
}
if(error)
{
- log(LL_ERR, "check_config: %d error(s) in configuration file, exit!", error);
+ llog(LL_ERR, "check_config: %d error(s) in configuration file, exit!", error);
do_exit(1);
}
}
diff --git a/usr.sbin/i4b/isdnd/support.c b/usr.sbin/i4b/isdnd/support.c
index 337c215..156ed29 100644
--- a/usr.sbin/i4b/isdnd/support.c
+++ b/usr.sbin/i4b/isdnd/support.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Thu Jul 31 11:05:16 2003]
+ * last edit-date: [Sat May 13 13:19:23 2006]
*
*---------------------------------------------------------------------------*/
@@ -60,7 +60,7 @@ find_active_entry_by_driver(int drivertype, int driverunit)
if(isvalidtime(cep) == 0)
{
- DBGL(DL_VALID, (log(LL_DBG, "find_active_entry_by_driver: entry %d, time not valid!", i)));
+ DBGL(DL_VALID, (llog(LL_DBG, "find_active_entry_by_driver: entry %d, time not valid!", i)));
continue;
}
@@ -68,13 +68,13 @@ find_active_entry_by_driver(int drivertype, int driverunit)
if(cep->cdid == CDID_UNUSED)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_active_entry_by_driver: entry %d [%s%d], cdid=CDID_UNUSED !",
+ DBGL(DL_MSG, (llog(LL_DBG, "find_active_entry_by_driver: entry %d [%s%d], cdid=CDID_UNUSED !",
i, bdrivername(drivertype), driverunit)));
return(NULL);
}
else if(cep->cdid == CDID_RESERVED)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_active_entry_by_driver: entry %d [%s%d], cdid=CDID_RESERVED!",
+ DBGL(DL_MSG, (llog(LL_DBG, "find_active_entry_by_driver: entry %d [%s%d], cdid=CDID_RESERVED!",
i, bdrivername(drivertype), driverunit)));
return(NULL);
}
@@ -108,7 +108,7 @@ find_by_device_for_dialout(int drivertype, int driverunit)
if(isvalidtime(cep) == 0)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialout: entry %d, time not valid!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialout: entry %d, time not valid!", i)));
continue;
}
@@ -116,7 +116,7 @@ find_by_device_for_dialout(int drivertype, int driverunit)
if(cep->cdid == CDID_RESERVED)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialout: entry %d, cdid reserved!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialout: entry %d, cdid reserved!", i)));
return(NULL);
}
@@ -124,7 +124,7 @@ find_by_device_for_dialout(int drivertype, int driverunit)
if(cep->cdid != CDID_UNUSED)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialout: entry %d, cdid in use", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialout: entry %d, cdid in use", i)));
return(NULL);
}
@@ -132,17 +132,17 @@ find_by_device_for_dialout(int drivertype, int driverunit)
{
/* found an entry to be used for calling out */
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialout: found entry %d!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialout: found entry %d!", i)));
return(cep);
}
else
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialout: entry %d, setup_dialout() failed!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialout: entry %d, setup_dialout() failed!", i)));
return(NULL);
}
}
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialout: no entry found!")));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialout: no entry found!")));
return(NULL);
}
@@ -171,7 +171,7 @@ find_by_device_for_dialoutnumber(msg_dialoutnumber_ind_t *mp)
if(isvalidtime(cep) == 0)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, time not valid!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, time not valid!", i)));
continue;
}
@@ -179,7 +179,7 @@ find_by_device_for_dialoutnumber(msg_dialoutnumber_ind_t *mp)
if(cep->cdid == CDID_RESERVED)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, cdid reserved!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, cdid reserved!", i)));
return(NULL);
}
@@ -187,7 +187,7 @@ find_by_device_for_dialoutnumber(msg_dialoutnumber_ind_t *mp)
if(cep->cdid != CDID_UNUSED)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, cdid in use", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, cdid in use", i)));
return(NULL);
}
@@ -199,7 +199,7 @@ find_by_device_for_dialoutnumber(msg_dialoutnumber_ind_t *mp)
{
if(!(isdigit(*(mp->cmd+j))))
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, dial string contains non-digit at pos %d", i, j)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, dial string contains non-digit at pos %d", i, j)));
return(NULL);
}
/* fill in number to dial */
@@ -212,7 +212,7 @@ find_by_device_for_dialoutnumber(msg_dialoutnumber_ind_t *mp)
{
if(!(isdigit(*(mp->subaddr+j))))
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, subaddr string contains non-digit at pos %d", i, j)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, subaddr string contains non-digit at pos %d", i, j)));
return(NULL);
}
/* fill in number to dial */
@@ -226,17 +226,17 @@ find_by_device_for_dialoutnumber(msg_dialoutnumber_ind_t *mp)
{
/* found an entry to be used for calling out */
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialoutnumber: found entry %d!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialoutnumber: found entry %d!", i)));
return(cep);
}
else
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, setup_dialout() failed!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialoutnumber: entry %d, setup_dialout() failed!", i)));
return(NULL);
}
}
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_dialoutnumber: no entry found!")));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_dialoutnumber: no entry found!")));
return(NULL);
}
@@ -247,7 +247,7 @@ cfg_entry_t *
find_by_device_for_keypad(int drivertype, int driverunit, int cmdlen, char *cmd)
{
cfg_entry_t *cep = NULL;
- int i, j;
+ int i;
for(i=0; i < nentries; i++)
{
@@ -265,7 +265,7 @@ find_by_device_for_keypad(int drivertype, int driverunit, int cmdlen, char *cmd)
if(isvalidtime(cep) == 0)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_keypad: entry %d, time not valid!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_keypad: entry %d, time not valid!", i)));
continue;
}
@@ -273,7 +273,7 @@ find_by_device_for_keypad(int drivertype, int driverunit, int cmdlen, char *cmd)
if(cep->cdid == CDID_RESERVED)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_keypad: entry %d, cdid reserved!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_keypad: entry %d, cdid reserved!", i)));
return(NULL);
}
@@ -281,7 +281,7 @@ find_by_device_for_keypad(int drivertype, int driverunit, int cmdlen, char *cmd)
if(cep->cdid != CDID_UNUSED)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_keypad: entry %d, cdid in use", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_keypad: entry %d, cdid in use", i)));
return(NULL);
}
@@ -292,23 +292,23 @@ find_by_device_for_keypad(int drivertype, int driverunit, int cmdlen, char *cmd)
bzero(cep->keypad, KEYPAD_MAX);
strncpy(cep->keypad, cmd, cmdlen);
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_keypad: entry %d, keypad string is %s", i, cep->keypad)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_keypad: entry %d, keypad string is %s", i, cep->keypad)));
if((setup_dialout(cep)) == GOOD)
{
/* found an entry to be used for calling out */
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_keypad: found entry %d!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_keypad: found entry %d!", i)));
return(cep);
}
else
{
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_keypad: entry %d, setup_dialout() failed!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_keypad: entry %d, setup_dialout() failed!", i)));
return(NULL);
}
}
- DBGL(DL_MSG, (log(LL_DBG, "find_by_device_for_keypad: no entry found!")));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_by_device_for_keypad: no entry found!")));
return(NULL);
}
@@ -324,7 +324,7 @@ setup_dialout(cfg_entry_t *cep)
if((get_controller_state(cep->isdncontroller)) != CTRL_UP)
{
- DBGL(DL_MSG, (log(LL_DBG, "setup_dialout: entry %s, controller is down", cep->name)));
+ DBGL(DL_MSG, (llog(LL_DBG, "setup_dialout: entry %s, controller is down", cep->name)));
return(ERROR);
}
@@ -343,7 +343,7 @@ setup_dialout(cfg_entry_t *cep)
if (i == isdn_ctrl_tab[cep->isdncontroller].nbch)
{
- DBGL(DL_MSG, (log(LL_DBG, "setup_dialout: entry %s, no channel free", cep->name)));
+ DBGL(DL_MSG, (llog(LL_DBG, "setup_dialout: entry %s, no channel free", cep->name)));
return(ERROR);
}
cep->isdnchannelused = CHAN_ANY;
@@ -352,14 +352,14 @@ setup_dialout(cfg_entry_t *cep)
default:
if((ret_channel_state(cep->isdncontroller, cep->isdnchannel)) != CHAN_IDLE)
{
- DBGL(DL_MSG, (log(LL_DBG, "setup_dialout: entry %s, channel not free", cep->name)));
+ DBGL(DL_MSG, (llog(LL_DBG, "setup_dialout: entry %s, channel not free", cep->name)));
return(ERROR);
}
cep->isdnchannelused = cep->isdnchannel;
break;
}
- DBGL(DL_MSG, (log(LL_DBG, "setup_dialout: entry %s ok!", cep->name)));
+ DBGL(DL_MSG, (llog(LL_DBG, "setup_dialout: entry %s ok!", cep->name)));
/* preset disconnect cause */
@@ -392,11 +392,11 @@ get_cep_by_driver(int drivertype, int driverunit)
if(isvalidtime(cep) == 0)
{
- DBGL(DL_MSG, (log(LL_DBG, "get_cep_by_driver: entry %d, time not valid!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "get_cep_by_driver: entry %d, time not valid!", i)));
continue;
}
- DBGL(DL_MSG, (log(LL_DBG, "get_cep_by_driver: found entry %d!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "get_cep_by_driver: found entry %d!", i)));
return(cep);
}
return(NULL);
@@ -426,12 +426,12 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
src_tela = get_alias(mp->src_telno);
dst_tela = get_alias(mp->dst_telno);
- log(LL_CHD, "%05d <unknown> CW from %s to %s (no channel free)",
+ llog(LL_CHD, "%05d <unknown> CW from %s to %s (no channel free)",
mp->header.cdid, src_tela, dst_tela);
}
else
{
- log(LL_CHD, "%05d <unknown> call waiting from %s to %s (no channel free)",
+ llog(LL_CHD, "%05d <unknown> call waiting from %s to %s (no channel free)",
mp->header.cdid, mp->src_telno, mp->dst_telno);
}
return(NULL);
@@ -446,14 +446,14 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
if(strncmp(cep->local_phone_incoming.number, mp->dst_telno, strlen(cep->local_phone_incoming.number)))
{
- DBGL(DL_MSG, (log(LL_DBG, "find_matching_entry_incoming: entry %d, myno %s != incomingno %s", i,
+ DBGL(DL_MSG, (llog(LL_DBG, "find_matching_entry_incoming: entry %d, myno %s != incomingno %s", i,
cep->local_phone_incoming.number, mp->dst_telno)));
continue;
}
if (cep->usesubaddr && strncmp(cep->local_phone_incoming.subaddr, mp->dst_subaddr, strlen(cep->local_phone_incoming.subaddr)))
{
- DBGL(DL_MSG, (log(LL_DBG, "find_matching_entry_incoming: entry %d, mysubno %s != incomingsubno %s", i,
+ DBGL(DL_MSG, (llog(LL_DBG, "find_matching_entry_incoming: entry %d, mysubno %s != incomingsubno %s", i,
cep->local_phone_incoming.subaddr, mp->dst_subaddr)));
continue;
}
@@ -484,14 +484,14 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
{
if ((!cep->usesubaddr) || (in->subaddr[0] == '*') || (!strncmp(in->subaddr, mp->src_subaddr, strlen(in->subaddr))))
{
- DBGL(DL_MSG, (log(LL_DBG, "find_matching_entry_incoming: entry %d, match: remno %s = incomingfromno %s", i,
+ DBGL(DL_MSG, (llog(LL_DBG, "find_matching_entry_incoming: entry %d, match: remno %s = incomingfromno %s", i,
in->number, mp->src_telno)));
break;
}
}
else
{
- DBGL(DL_MSG, (log(LL_DBG, "find_matching_entry_incoming: entry %d, remno %s != incomingfromno %s", i,
+ DBGL(DL_MSG, (llog(LL_DBG, "find_matching_entry_incoming: entry %d, remno %s != incomingfromno %s", i,
in->number, mp->src_telno)));
}
}
@@ -504,7 +504,7 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
if(cep->b1protocol != mp->bprot)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_matching_entry_incoming: entry %d, bprot %d != incomingprot %d", i,
+ DBGL(DL_MSG, (llog(LL_DBG, "find_matching_entry_incoming: entry %d, bprot %d != incomingprot %d", i,
cep->b1protocol, mp->bprot)));
continue;
}
@@ -515,7 +515,7 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
{
if(cep->cdid == CDID_RESERVED)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_matching_entry_incoming: entry %d, cdid is reserved", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_matching_entry_incoming: entry %d, cdid is reserved", i)));
}
else if (cep->dialin_reaction == REACT_ACCEPT
&& cep->dialouttype == DIALOUT_CALLEDBACK)
@@ -529,7 +529,7 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
* and never be able to establish a connection.
* In the called-back case this should not happen.
*/
- DBGL(DL_MSG, (log(LL_DBG, "find_matching_entry_incoming: entry %d, incoming call for callback in progress (cdid %05d)", i, cep->cdid)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_matching_entry_incoming: entry %d, incoming call for callback in progress (cdid %05d)", i, cep->cdid)));
/* save the current call state, we're going to overwrite it with the
* new incoming state below... */
@@ -539,7 +539,7 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
}
else
{
- DBGL(DL_MSG, (log(LL_DBG, "find_matching_entry_incoming: entry %d, cdid in use", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_matching_entry_incoming: entry %d, cdid in use", i)));
continue; /* yes, next */
}
}
@@ -548,7 +548,7 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
if(mp->controller > ncontroller)
{
- log(LL_CHD, "%05d %s incoming call with invalid controller %d",
+ llog(LL_CHD, "%05d %s incoming call with invalid controller %d",
mp->header.cdid, cep->name, mp->controller);
return(NULL);
}
@@ -557,7 +557,7 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
if((get_controller_state(mp->controller)) != CTRL_UP)
{
- log(LL_CHD, "%05d %s incoming call, controller %d DOWN!",
+ llog(LL_CHD, "%05d %s incoming call, controller %d DOWN!",
mp->header.cdid, cep->name, mp->controller);
return(NULL);
}
@@ -570,7 +570,7 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
if( (mp->controller != -1) &&
(mp->controller != cep->isdncontroller) )
{
- log(LL_CHD, "%05d %s incoming call, controller %d != incoming %d",
+ llog(LL_CHD, "%05d %s incoming call, controller %d != incoming %d",
mp->header.cdid, cep->name,
cep->isdncontroller, mp->controller);
continue;
@@ -589,14 +589,14 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
if (i == isdn_ctrl_tab[mp->controller].nbch)
{
- log(LL_CHD, "%05d %s incoming call, no channel free!",
+ llog(LL_CHD, "%05d %s incoming call, no channel free!",
mp->header.cdid, cep->name);
return(NULL);
}
break;
case CHAN_NO:
- log(LL_CHD, "%05d %s incoming call, call waiting (no channel available)!",
+ llog(LL_CHD, "%05d %s incoming call, call waiting (no channel available)!",
mp->header.cdid, cep->name);
return(NULL);
break;
@@ -604,7 +604,7 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
default:
if((ret_channel_state(mp->controller, mp->channel)) != CHAN_IDLE)
{
- log(LL_CHD, "%05d %s incoming call, channel B%d not free!",
+ llog(LL_CHD, "%05d %s incoming call, channel B%d not free!",
mp->header.cdid, cep->name, mp->channel+1);
return(NULL);
}
@@ -615,7 +615,7 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
if(isvalidtime(cep) == 0)
{
- DBGL(DL_MSG, (log(LL_DBG, "find_matching_entry_incoming: entry %d, time not valid!", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_matching_entry_incoming: entry %d, time not valid!", i)));
continue;
}
@@ -642,7 +642,7 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
/* set interface up */
- DBGL(DL_MSG, (log(LL_DBG, "find_matching_entry_incoming: entry %d, ", i)));
+ DBGL(DL_MSG, (llog(LL_DBG, "find_matching_entry_incoming: entry %d, ", i)));
mui.driver = cep->usrdevicename;
mui.driver_unit = cep->usrdeviceunit;
@@ -650,7 +650,7 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
if((ioctl(isdnfd, I4B_UPDOWN_IND, &mui)) < 0)
{
- log(LL_ERR, "find_matching_entry_incoming: ioctl I4B_UPDOWN_IND failed: %s", strerror(errno));
+ llog(LL_ERR, "find_matching_entry_incoming: ioctl I4B_UPDOWN_IND failed: %s", strerror(errno));
error_exit(1, "find_matching_entry_incoming: ioctl I4B_UPDOWN_IND failed: %s", strerror(errno));
}
@@ -668,12 +668,12 @@ find_matching_entry_incoming(msg_connect_ind_t *mp)
src_tela = get_alias(mp->src_telno);
dst_tela = get_alias(mp->dst_telno);
- log(LL_CHD, "%05d Call from %s to %s",
+ llog(LL_CHD, "%05d Call from %s to %s",
mp->header.cdid, src_tela, dst_tela);
}
else
{
- log(LL_CHD, "%05d <unknown> incoming call from %s to %s ctrl %d",
+ llog(LL_CHD, "%05d <unknown> incoming call from %s to %s ctrl %d",
mp->header.cdid, mp->src_telno, mp->dst_telno, mp->controller);
}
return(NULL);
@@ -780,7 +780,7 @@ handle_charge(cfg_entry_t *cep)
{
if(cep->aoc_diff != cep->unitlength)
{
- DBGL(DL_MSG, (log(LL_DBG, "handle_charge: AOCD unit length updated %d -> %d secs", cep->unitlength, cep->aoc_diff)));
+ DBGL(DL_MSG, (llog(LL_DBG, "handle_charge: AOCD unit length updated %d -> %d secs", cep->unitlength, cep->aoc_diff)));
cep->unitlength = cep->aoc_diff;
@@ -789,7 +789,7 @@ handle_charge(cfg_entry_t *cep)
else
{
#ifdef NOTDEF
- DBGL(DL_MSG, (log(LL_DBG, "handle_charge: AOCD unit length still %d secs", cep->unitlength)));
+ DBGL(DL_MSG, (llog(LL_DBG, "handle_charge: AOCD unit length still %d secs", cep->unitlength)));
#endif
}
}
@@ -823,14 +823,14 @@ unitlen_chkupd(cfg_entry_t *cep)
tupd.shorthold_data.earlyhup_time = 0;
break;
default:
- log(LL_ERR, "unitlen_chkupd bad shorthold_algorithm %d", cep->shorthold_algorithm );
+ llog(LL_ERR, "unitlen_chkupd bad shorthold_algorithm %d", cep->shorthold_algorithm );
return;
break;
}
if((ioctl(isdnfd, I4B_TIMEOUT_UPD, &tupd)) < 0)
{
- log(LL_ERR, "ioctl I4B_TIMEOUT_UPD failed: %s", strerror(errno));
+ llog(LL_ERR, "ioctl I4B_TIMEOUT_UPD failed: %s", strerror(errno));
error_exit(1, "ioctl I4B_TIMEOUT_UPD failed: %s", strerror(errno));
}
}
@@ -874,7 +874,7 @@ close_allactive(void)
if(j)
{
- log(LL_DMN, "close_allactive: waiting for all connections terminated");
+ llog(LL_DMN, "close_allactive: waiting for all connections terminated");
sleep(5);
}
}
@@ -889,7 +889,7 @@ if_up(cfg_entry_t *cep)
/* set interface up */
- DBGL(DL_MSG, (log(LL_DBG, "if_up: taking %s%d up", bdrivername(cep->usrdevicename), cep->usrdeviceunit)));
+ DBGL(DL_MSG, (llog(LL_DBG, "if_up: taking %s%d up", bdrivername(cep->usrdevicename), cep->usrdeviceunit)));
mui.driver = cep->usrdevicename;
mui.driver_unit = cep->usrdeviceunit;
@@ -897,7 +897,7 @@ if_up(cfg_entry_t *cep)
if((ioctl(isdnfd, I4B_UPDOWN_IND, &mui)) < 0)
{
- log(LL_ERR, "if_up: ioctl I4B_UPDOWN_IND failed: %s", strerror(errno));
+ llog(LL_ERR, "if_up: ioctl I4B_UPDOWN_IND failed: %s", strerror(errno));
error_exit(1, "if_up: ioctl I4B_UPDOWN_IND failed: %s", strerror(errno));
}
cep->down_retry_count = 0;
@@ -922,7 +922,7 @@ if_down(cfg_entry_t *cep)
/* set interface up */
- DBGL(DL_MSG, (log(LL_DBG, "if_down: taking %s%d down", bdrivername(cep->usrdevicename), cep->usrdeviceunit)));
+ DBGL(DL_MSG, (llog(LL_DBG, "if_down: taking %s%d down", bdrivername(cep->usrdevicename), cep->usrdeviceunit)));
mui.driver = cep->usrdevicename;
mui.driver_unit = cep->usrdeviceunit;
@@ -930,7 +930,7 @@ if_down(cfg_entry_t *cep)
if((ioctl(isdnfd, I4B_UPDOWN_IND, &mui)) < 0)
{
- log(LL_ERR, "if_down: ioctl I4B_UPDOWN_IND failed: %s", strerror(errno));
+ llog(LL_ERR, "if_down: ioctl I4B_UPDOWN_IND failed: %s", strerror(errno));
error_exit(1, "if_down: ioctl I4B_UPDOWN_IND failed: %s", strerror(errno));
}
cep->went_down_time = time(NULL);
@@ -963,7 +963,7 @@ dialresponse(cfg_entry_t *cep, int dstat)
if(dstat < DSTAT_NONE || dstat > DSTAT_INONLY)
{
- log(LL_ERR, "dialresponse: dstat out of range %d!", dstat);
+ llog(LL_ERR, "dialresponse: dstat out of range %d!", dstat);
return;
}
@@ -974,11 +974,11 @@ dialresponse(cfg_entry_t *cep, int dstat)
if((ioctl(isdnfd, I4B_DIALOUT_RESP, &mdr)) < 0)
{
- log(LL_ERR, "dialresponse: ioctl I4B_DIALOUT_RESP failed: %s", strerror(errno));
+ llog(LL_ERR, "dialresponse: ioctl I4B_DIALOUT_RESP failed: %s", strerror(errno));
error_exit(1, "dialresponse: ioctl I4B_DIALOUT_RESP failed: %s", strerror(errno));
}
- DBGL(DL_DRVR, (log(LL_DBG, "dialresponse: sent [%s]", stattab[dstat])));
+ DBGL(DL_DRVR, (llog(LL_DBG, "dialresponse: sent [%s]", stattab[dstat])));
}
/*--------------------------------------------------------------------------*
@@ -991,7 +991,7 @@ handle_scrprs(int cdid, int scr, int prs, char *caller)
if(scr < SCR_NONE || scr > SCR_NET)
{
- log(LL_ERR, "msg_connect_ind: invalid screening indicator value %d!", scr);
+ llog(LL_ERR, "msg_connect_ind: invalid screening indicator value %d!", scr);
}
else
{
@@ -1004,11 +1004,11 @@ handle_scrprs(int cdid, int scr, int prs, char *caller)
if(extcallattr)
{
- log(LL_CHD, "%05d %s %s", cdid, caller, scrtab[scr]);
+ llog(LL_CHD, "%05d %s %s", cdid, caller, scrtab[scr]);
}
else
{
- DBGL(DL_MSG, (log(LL_DBG, "%s - %s", caller, scrtab[scr])));
+ DBGL(DL_MSG, (llog(LL_DBG, "%s - %s", caller, scrtab[scr])));
}
}
@@ -1016,7 +1016,7 @@ handle_scrprs(int cdid, int scr, int prs, char *caller)
if(prs < PRS_NONE || prs > PRS_RESERVED)
{
- log(LL_ERR, "msg_connect_ind: invalid presentation indicator value %d!", prs);
+ llog(LL_ERR, "msg_connect_ind: invalid presentation indicator value %d!", prs);
}
else
{
@@ -1029,11 +1029,11 @@ handle_scrprs(int cdid, int scr, int prs, char *caller)
if(extcallattr)
{
- log(LL_CHD, "%05d %s %s", cdid, caller, prstab[prs]);
+ llog(LL_CHD, "%05d %s %s", cdid, caller, prstab[prs]);
}
else
{
- DBGL(DL_MSG, (log(LL_DBG, "%s - %s", caller, prstab[prs])));
+ DBGL(DL_MSG, (llog(LL_DBG, "%s - %s", caller, prstab[prs])));
}
}
}
@@ -1057,14 +1057,14 @@ isvalidtime(cfg_entry_t *cep)
{
if(isholiday(tp->tm_mday, (tp->tm_mon)+1, (tp->tm_year)+1900))
{
- DBGL(DL_VALID, (log(LL_DBG, "isvalidtime: holiday %d.%d.%d", tp->tm_mday, (tp->tm_mon)+1, (tp->tm_year)+1900)));
+ DBGL(DL_VALID, (llog(LL_DBG, "isvalidtime: holiday %d.%d.%d", tp->tm_mday, (tp->tm_mon)+1, (tp->tm_year)+1900)));
goto dayok;
}
}
if(cep->day & (1 << tp->tm_wday))
{
- DBGL(DL_VALID, (log(LL_DBG, "isvalidtime: day match")));
+ DBGL(DL_VALID, (llog(LL_DBG, "isvalidtime: day match")));
goto dayok;
}
@@ -1073,7 +1073,7 @@ isvalidtime(cfg_entry_t *cep)
dayok:
if(cep->fromhr==0 && cep->frommin==0 && cep->tohr==0 && cep->tomin==0)
{
- DBGL(DL_VALID, (log(LL_DBG, "isvalidtime: no time specified, match!")));
+ DBGL(DL_VALID, (llog(LL_DBG, "isvalidtime: no time specified, match!")));
return(1);
}
@@ -1084,7 +1084,7 @@ dayok:
if( (tp->tm_hour > cep->fromhr) ||
(tp->tm_hour == cep->fromhr && tp->tm_min > cep->frommin) )
{
- DBGL(DL_VALID, (log(LL_DBG, "isvalidtime: t<f-1, spec=%02d:%02d-%02d:%02d, curr=%02d:%02d, match!",
+ DBGL(DL_VALID, (llog(LL_DBG, "isvalidtime: t<f-1, spec=%02d:%02d-%02d:%02d, curr=%02d:%02d, match!",
cep->fromhr, cep->frommin,
cep->tohr, cep->tomin,
tp->tm_hour, tp->tm_min)));
@@ -1097,7 +1097,7 @@ dayok:
if( (tp->tm_hour < cep->tohr) ||
(tp->tm_hour == cep->tohr && tp->tm_min < cep->tomin) )
{
- DBGL(DL_VALID, (log(LL_DBG, "isvalidtime: t<f-2, spec=%02d:%02d-%02d:%02d, curr=%02d:%02d, match!",
+ DBGL(DL_VALID, (llog(LL_DBG, "isvalidtime: t<f-2, spec=%02d:%02d-%02d:%02d, curr=%02d:%02d, match!",
cep->fromhr, cep->frommin,
cep->tohr, cep->tomin,
tp->tm_hour, tp->tm_min)));
@@ -1109,7 +1109,7 @@ dayok:
{
if(tp->tm_min >= cep->frommin && tp->tm_min < cep->tomin)
{
- DBGL(DL_VALID, (log(LL_DBG, "isvalidtime: f=t, spec=%02d:%02d-%02d:%02d, curr=%02d:%02d, match!",
+ DBGL(DL_VALID, (llog(LL_DBG, "isvalidtime: f=t, spec=%02d:%02d-%02d:%02d, curr=%02d:%02d, match!",
cep->fromhr, cep->frommin,
cep->tohr, cep->tomin,
tp->tm_hour, tp->tm_min)));
@@ -1123,14 +1123,14 @@ dayok:
(tp->tm_hour == cep->fromhr && tp->tm_min >= cep->frommin) ||
(tp->tm_hour == cep->tohr && tp->tm_min < cep->tomin) )
{
- DBGL(DL_VALID, (log(LL_DBG, "isvalidtime: t>f, spec=%02d:%02d-%02d:%02d, curr=%02d:%02d, match!",
+ DBGL(DL_VALID, (llog(LL_DBG, "isvalidtime: t>f, spec=%02d:%02d-%02d:%02d, curr=%02d:%02d, match!",
cep->fromhr, cep->frommin,
cep->tohr, cep->tomin,
tp->tm_hour, tp->tm_min)));
return(1);
}
}
- DBGL(DL_VALID, (log(LL_DBG, "isvalidtime: spec=%02d:%02d-%02d:%02d, curr=%02d:%02d, no match!",
+ DBGL(DL_VALID, (llog(LL_DBG, "isvalidtime: spec=%02d:%02d-%02d:%02d, curr=%02d:%02d, no match!",
cep->fromhr, cep->frommin,
cep->tohr, cep->tomin,
tp->tm_hour, tp->tm_min)));
diff --git a/usr.sbin/i4b/isdnd/timer.c b/usr.sbin/i4b/isdnd/timer.c
index 34c0c43..90bee19 100644
--- a/usr.sbin/i4b/isdnd/timer.c
+++ b/usr.sbin/i4b/isdnd/timer.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Tue Mar 26 14:38:24 2002]
+ * last edit-date: [Sat May 13 13:13:13 2006]
*
*---------------------------------------------------------------------------*/
@@ -46,9 +46,9 @@ static void recover_illegal(cfg_entry_t *cep);
static void
recover_illegal(cfg_entry_t *cep)
{
- log(LL_ERR, "recover_illegal: ERROR, entry %s attempting disconnect!", cep->name);
+ llog(LL_ERR, "recover_illegal: ERROR, entry %s attempting disconnect!", cep->name);
sendm_disconnect_req(cep, (CAUSET_I4B << 8) | CAUSE_I4B_NORMAL);
- log(LL_ERR, "recover_illegal: ERROR, entry %s - reset state/cdid!", cep->name);
+ llog(LL_ERR, "recover_illegal: ERROR, entry %s - reset state/cdid!", cep->name);
cep->state = ST_IDLE;
cep->cdid = CDID_UNUSED;
}
@@ -94,7 +94,7 @@ hr_callgate(void)
if((tv_now.tv_sec - tv_last.tv_sec) < 1)
{
- DBGL(DL_TIME, (log(LL_DBG, "time < 1 - last %ld:%ld now %ld:%ld",
+ DBGL(DL_TIME, (llog(LL_DBG, "time < 1 - last %ld:%ld now %ld:%ld",
tv_last.tv_sec, tv_last.tv_usec,
tv_now.tv_sec, tv_now.tv_usec)));
return(1);
@@ -103,14 +103,14 @@ hr_callgate(void)
{
if(((1000000 - tv_last.tv_usec) + tv_now.tv_usec) < 900000)
{
- DBGL(DL_TIME, (log(LL_DBG, "time < 900000us - last %ld:%ld now %ld:%ld",
+ DBGL(DL_TIME, (llog(LL_DBG, "time < 900000us - last %ld:%ld now %ld:%ld",
tv_last.tv_sec, tv_last.tv_usec,
tv_now.tv_sec, tv_now.tv_usec)));
return(1);
}
}
- DBGL(DL_TIME, (log(LL_DBG, "time OK! - last %ld:%ld now %ld:%ld",
+ DBGL(DL_TIME, (llog(LL_DBG, "time OK! - last %ld:%ld now %ld:%ld",
tv_last.tv_sec, tv_last.tv_usec,
tv_now.tv_sec, tv_now.tv_usec)));
@@ -144,7 +144,7 @@ handle_recovery(void)
{
if(cep->budget_callbackperiod_time <= now)
{
- DBGL(DL_BDGT, (log(LL_DBG, "%s: new cback-budget-period (%d s, %d left)",
+ DBGL(DL_BDGT, (llog(LL_DBG, "%s: new cback-budget-period (%d s, %d left)",
cep->name, cep->budget_callbackperiod, cep->budget_callbackncalls_cnt)));
cep->budget_callbackperiod_time = now + cep->budget_callbackperiod;
cep->budget_callbackncalls_cnt = cep->budget_callbackncalls;
@@ -155,7 +155,7 @@ handle_recovery(void)
{
if(cep->budget_calloutperiod_time <= now)
{
- DBGL(DL_BDGT, (log(LL_DBG, "%s: new cout-budget-period (%d s, %d left)",
+ DBGL(DL_BDGT, (llog(LL_DBG, "%s: new cout-budget-period (%d s, %d left)",
cep->name, cep->budget_calloutperiod, cep->budget_calloutncalls_cnt)));
cep->budget_calloutperiod_time = now + cep->budget_calloutperiod;
cep->budget_calloutncalls_cnt = cep->budget_calloutncalls;
@@ -190,7 +190,7 @@ handle_active(cfg_entry_t *cep, time_t now)
case ST_ACCEPTED:
if(cep->timerval && (--(cep->timerremain)) <= 0)
{
- DBGL(DL_RCVRY, (log(LL_DBG, "handle_active: entry %s, TIMEOUT !!!", cep->name)));
+ DBGL(DL_RCVRY, (llog(LL_DBG, "handle_active: entry %s, TIMEOUT !!!", cep->name)));
cep->timerval = cep->timerremain = 0;
next_state(cep, EV_TIMO);
}
@@ -203,7 +203,7 @@ handle_active(cfg_entry_t *cep, time_t now)
}
else
{
- log(LL_CHD, "%05d %s answering: incoming call from %s to %s",
+ llog(LL_CHD, "%05d %s answering: incoming call from %s to %s",
cep->cdid, cep->name,
cep->real_phone_incoming.number,
cep->local_phone_incoming.number);
@@ -220,7 +220,7 @@ handle_active(cfg_entry_t *cep, time_t now)
if(cep->hangup)
{
- DBGL(DL_RCVRY, (log(LL_DBG, "handle_active: entry %s, hangup request!", cep->name)));
+ DBGL(DL_RCVRY, (llog(LL_DBG, "handle_active: entry %s, hangup request!", cep->name)));
cep->hangup = 0;
next_state(cep, EV_DRQ);
}
@@ -232,7 +232,7 @@ handle_active(cfg_entry_t *cep, time_t now)
int connecttime = (int)difftime(now, cep->connect_time);
if(connecttime > cep->maxconnecttime)
{
- DBGL(DL_RCVRY, (log(LL_DBG,
+ DBGL(DL_RCVRY, (llog(LL_DBG,
"handle_active: entry %s, maxconnecttime %d reached!",
cep->name, cep->maxconnecttime)));
next_state(cep, EV_DRQ);
@@ -255,7 +255,7 @@ handle_active(cfg_entry_t *cep, time_t now)
if(newrate != cep->unitlength)
{
- DBGL(DL_MSG, (log(LL_DBG, "handle_active: rates unit length updated %d -> %d", cep->unitlength, newrate)));
+ DBGL(DL_MSG, (llog(LL_DBG, "handle_active: rates unit length updated %d -> %d", cep->unitlength, newrate)));
cep->unitlength = newrate;
@@ -287,12 +287,12 @@ handle_reserved(cfg_entry_t *cep, time_t now)
if(now > (cep->last_dial_time + waittime))
{
- DBGL(DL_RCVRY, (log(LL_DBG, "handle_reserved: entry %s, dial retry request!", cep->name)));
+ DBGL(DL_RCVRY, (llog(LL_DBG, "handle_reserved: entry %s, dial retry request!", cep->name)));
cep->state = ST_DIALRETRY;
if((cep->cdid = get_cdid()) == 0)
{
- log(LL_ERR, "handle_reserved: dialretry get_cdid() returned 0!");
+ llog(LL_ERR, "handle_reserved: dialretry get_cdid() returned 0!");
cep->state = ST_IDLE;
cep->cdid = CDID_UNUSED;
return;
@@ -304,7 +304,7 @@ handle_reserved(cfg_entry_t *cep, time_t now)
}
else
{
- log(LL_ERR, "handle_reserved: dialretry setup_dialout returned ERROR!");
+ llog(LL_ERR, "handle_reserved: dialretry setup_dialout returned ERROR!");
cep->state = ST_IDLE;
cep->cdid = CDID_UNUSED;
return;
@@ -317,12 +317,12 @@ handle_reserved(cfg_entry_t *cep, time_t now)
if(now > (cep->last_release_time + cep->callbackwait))
{
- DBGL(DL_RCVRY, (log(LL_DBG, "handle_reserved: entry %s, callback dial!", cep->name)));
+ DBGL(DL_RCVRY, (llog(LL_DBG, "handle_reserved: entry %s, callback dial!", cep->name)));
cep->state = ST_ACB_DIAL;
if((cep->cdid = get_cdid()) == 0)
{
- log(LL_ERR, "handle_reserved: callback get_cdid() returned 0!");
+ llog(LL_ERR, "handle_reserved: callback get_cdid() returned 0!");
cep->state = ST_IDLE;
cep->cdid = CDID_UNUSED;
return;
@@ -336,7 +336,7 @@ handle_reserved(cfg_entry_t *cep, time_t now)
}
else
{
- log(LL_ERR, "handle_reserved: callback setup_dialout returned ERROR!");
+ llog(LL_ERR, "handle_reserved: callback setup_dialout returned ERROR!");
cep->state = ST_IDLE;
cep->cdid = CDID_UNUSED;
return;
@@ -353,12 +353,12 @@ handle_reserved(cfg_entry_t *cep, time_t now)
if(now > (cep->last_release_time + waittime))
{
- DBGL(DL_RCVRY, (log(LL_DBG, "handle_reserved: entry %s, callback dial retry request!", cep->name)));
+ DBGL(DL_RCVRY, (llog(LL_DBG, "handle_reserved: entry %s, callback dial retry request!", cep->name)));
cep->state = ST_ACB_DIAL;
if((cep->cdid = get_cdid()) == 0)
{
- log(LL_ERR, "handle_reserved: callback dialretry get_cdid() returned 0!");
+ llog(LL_ERR, "handle_reserved: callback dialretry get_cdid() returned 0!");
cep->state = ST_IDLE;
cep->cdid = CDID_UNUSED;
return;
@@ -370,7 +370,7 @@ handle_reserved(cfg_entry_t *cep, time_t now)
}
else
{
- log(LL_ERR, "handle_reserved: callback dialretry setup_dialout returned ERROR!");
+ llog(LL_ERR, "handle_reserved: callback dialretry setup_dialout returned ERROR!");
cep->state = ST_IDLE;
cep->cdid = CDID_UNUSED;
return;
@@ -388,13 +388,13 @@ handle_reserved(cfg_entry_t *cep, time_t now)
{
/* inside normal retry cycle */
- DBGL(DL_RCVRY, (log(LL_DBG, "handle_reserved: entry %s, retry calledback dial #%d!",
+ DBGL(DL_RCVRY, (llog(LL_DBG, "handle_reserved: entry %s, retry calledback dial #%d!",
cep->name, cep->dial_count)));
cep->state = ST_PCB_DIAL;
if((cep->cdid = get_cdid()) == 0)
{
- log(LL_ERR, "handle_reserved: calledback get_cdid() returned 0!");
+ llog(LL_ERR, "handle_reserved: calledback get_cdid() returned 0!");
cep->state = ST_IDLE;
cep->cdid = CDID_UNUSED;
return;
@@ -407,7 +407,7 @@ handle_reserved(cfg_entry_t *cep, time_t now)
}
else
{
- log(LL_ERR, "handle_reserved: calledback setup_dialout returned ERROR!");
+ llog(LL_ERR, "handle_reserved: calledback setup_dialout returned ERROR!");
cep->state = ST_IDLE;
cep->cdid = CDID_UNUSED;
return;
@@ -417,7 +417,7 @@ handle_reserved(cfg_entry_t *cep, time_t now)
{
/* retries exhausted */
- DBGL(DL_RCVRY, (log(LL_DBG, "handle_reserved: calledback dial retries exhausted")));
+ DBGL(DL_RCVRY, (llog(LL_DBG, "handle_reserved: calledback dial retries exhausted")));
dialresponse(cep, DSTAT_TFAIL);
cep->cdid = CDID_UNUSED;
cep->dial_count = 0;
@@ -430,7 +430,7 @@ handle_reserved(cfg_entry_t *cep, time_t now)
if(now > (cep->went_down_time + cep->downtime))
{
- DBGL(DL_RCVRY, (log(LL_DBG, "handle_reserved: taking %s%d up", bdrivername(cep->usrdevicename), cep->usrdeviceunit)));
+ DBGL(DL_RCVRY, (llog(LL_DBG, "handle_reserved: taking %s%d up", bdrivername(cep->usrdevicename), cep->usrdeviceunit)));
if_up(cep);
cep->state = ST_IDLE;
cep->cdid = CDID_UNUSED;
OpenPOWER on IntegriCloud