Fixed logging, added cvs tags
This commit is contained in:
parent
43de18522a
commit
bfd74def66
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: mbtask/callstat.c
|
* $Id$
|
||||||
* Purpose ...............: Read mailer last call status
|
* Purpose ...............: Read mailer last call status
|
||||||
* Last modification date : 08-Jul-2001
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef CALLSTAT_H
|
#ifndef CALLSTAT_H
|
||||||
#define CALLSTAT_H
|
#define CALLSTAT_H
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
||||||
#define ST_PORTERR 1
|
#define ST_PORTERR 1
|
||||||
#define ST_NOCONN 2
|
#define ST_NOCONN 2
|
||||||
|
@ -584,12 +584,12 @@ int checktasks(int onsig)
|
|||||||
|
|
||||||
if (first && task[i].rc) {
|
if (first && task[i].rc) {
|
||||||
first = FALSE;
|
first = FALSE;
|
||||||
tasklog('t', "Task Type pid stat status rc status");
|
tasklog('t', "Task Type pid stat rc");
|
||||||
tasklog('t', "---------------- ------- ----- ---- ----------- ----- --------");
|
tasklog('t', "---------------- ------- ----- ---- -----");
|
||||||
for (j = 0; j < MAXTASKS; j++)
|
for (j = 0; j < MAXTASKS; j++)
|
||||||
if (strlen(task[j].name))
|
if (strlen(task[j].name))
|
||||||
tasklog('t', "%-16s %s %5d %s %-11d %5d %08x", task[j].name, callmode(task[j].tasktype),
|
tasklog('t', "%-16s %s %5d %s %5d", task[j].name, callmode(task[j].tasktype),
|
||||||
task[j].pid, task[j].running?"runs":"stop", task[j].status, task[j].rc, task[j].status);
|
task[j].pid, task[j].running?"runs":"stop", task[j].rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (task[i].rc) {
|
switch (task[i].rc) {
|
||||||
@ -607,7 +607,6 @@ int checktasks(int onsig)
|
|||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
tasklog('+', "errno=%d %s", errno, strerror(errno));
|
|
||||||
if (WIFEXITED(task[i].status)) {
|
if (WIFEXITED(task[i].status)) {
|
||||||
rc = WEXITSTATUS(task[i].status);
|
rc = WEXITSTATUS(task[i].status);
|
||||||
if (rc)
|
if (rc)
|
||||||
@ -652,7 +651,10 @@ void die(int onsig)
|
|||||||
int i, count;
|
int i, count;
|
||||||
|
|
||||||
signal(onsig, SIG_IGN);
|
signal(onsig, SIG_IGN);
|
||||||
tasklog('+', "Shutting down on signal %s", SigName[onsig]);
|
if (onsig == SIGTERM)
|
||||||
|
tasklog('+', "Starting normal shutdown");
|
||||||
|
else
|
||||||
|
tasklog('+', "Abnormal shutdown on signal %s", SigName[onsig]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First check if there are tasks running, if so try to stop them
|
* First check if there are tasks running, if so try to stop them
|
||||||
@ -681,6 +683,11 @@ void die(int onsig)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((count = checktasks(0)))
|
||||||
|
tasklog('?', "Shutdown with %d tasks still running", count);
|
||||||
|
else
|
||||||
|
tasklog('+', "Good, no more tasks running");
|
||||||
|
|
||||||
ulocktask();
|
ulocktask();
|
||||||
if (sock != -1)
|
if (sock != -1)
|
||||||
close(sock);
|
close(sock);
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
/* $Id */
|
|
||||||
|
|
||||||
#ifndef _MBTASK_H
|
#ifndef _MBTASK_H
|
||||||
#define _MBTASK_H
|
#define _MBTASK_H
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Defines.
|
* Defines.
|
||||||
* SLOWRUN is number of seconds for scheduling mailer calls. Leave at 20!
|
* SLOWRUN is number of seconds for scheduling mailer calls. Leave at 20!
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: mbtask - Scan mail outbound status
|
* Purpose ...............: mbtask - Scan mail outbound status
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: mbtask/scanout.c
|
* $Id$
|
||||||
* Purpose ...............: Outbound scanning
|
* Purpose ...............: Outbound scanning
|
||||||
* Last modification date : 09-Jul-2001
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef SCANOUT_H
|
#ifndef SCANOUT_H
|
||||||
#define SCANOUT_H
|
#define SCANOUT_H
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
||||||
#define OUT_PKT 0
|
#define OUT_PKT 0
|
||||||
#define OUT_DIR 1
|
#define OUT_DIR 1
|
||||||
#define OUT_FLO 2
|
#define OUT_FLO 2
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: signame.c
|
* $Id$
|
||||||
* Purpose ...............: Signal names
|
* Purpose ...............: Signal names
|
||||||
* Last modification date : 24-May-2001
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef _SIGNAME_H
|
#ifndef _SIGNAME_H
|
||||||
#define _SIGNAME_H
|
#define _SIGNAME_H
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
||||||
char SigName[32][16];
|
char SigName[32][16];
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: MBSE BBS Daemon
|
* Purpose ...............: MBSE BBS Daemon
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef _TASKCOMM_H
|
#ifndef _TASKCOMM_H
|
||||||
#define _TASKCOMM_H
|
#define _TASKCOMM_H
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
||||||
void do_cmd(char *);
|
void do_cmd(char *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef _TASKDISK_H
|
#ifndef _TASKDISK_H
|
||||||
#define _TASKDISK_H
|
#define _TASKDISK_H
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
||||||
char *get_diskstat(void); /* Get disk status */
|
char *get_diskstat(void); /* Get disk status */
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: mbtask/taskinfo.c
|
* $Id$
|
||||||
* Purpose ...............: Give system information
|
* Purpose ...............: Give system information
|
||||||
* Last modification date : 26-Oct-2001
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef _TASKINFO_H
|
#ifndef _TASKINFO_H
|
||||||
#define _TASKINFO_H
|
#define _TASKINFO_H
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
||||||
char *get_sysinfo(void); /* Get System Info */
|
char *get_sysinfo(void); /* Get System Info */
|
||||||
char *get_lastcallercount(void); /* Get Lastcallers count */
|
char *get_lastcallercount(void); /* Get Lastcallers count */
|
||||||
char *get_lastcallerrec(int); /* Get Lastcaller record */
|
char *get_lastcallerrec(int); /* Get Lastcaller record */
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#ifndef _TASKREGS_H
|
#ifndef _TASKREGS_H
|
||||||
#define _TASKREGS_H
|
#define _TASKREGS_H
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
||||||
#define MAXCLIENT 100
|
#define MAXCLIENT 100
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user