fix conflicting types for log(), add some prototypes to isdnd.h

This commit is contained in:
Hellmuth Michaelis 2006-05-13 12:42:55 +00:00
parent 564084e489
commit 93ad0725db
17 changed files with 547 additions and 545 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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)));
}

View File

@ -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);
}

View File

@ -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])));
}

View File

@ -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);
}
}

View File

@ -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 );

View File

@ -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;

View File

@ -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));
}
}

View File

@ -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));
}
}
}

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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,

File diff suppressed because it is too large Load Diff

View File

@ -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 @@ isvalidtime(cfg_entry_t *cep)
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 @@ isvalidtime(cfg_entry_t *cep)
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 @@ isvalidtime(cfg_entry_t *cep)
{
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 @@ isvalidtime(cfg_entry_t *cep)
(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)));

View File

@ -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;