Some small updates

This commit is contained in:
Michiel Broek
2003-02-12 20:20:59 +00:00
parent 75831ac20c
commit 8def403243
7 changed files with 58 additions and 56 deletions

View File

@@ -104,6 +104,7 @@ extern int pots_free; /* POTS lines free */
extern int isdn_free; /* ISDN lines free */
extern pp_list *pl; /* List of tty ports */
extern int ipmailers; /* TCP/IP mail sessions */
extern int tosswait; /* Toss wait timer */
@@ -839,7 +840,7 @@ void scheduler(void)
{
struct passwd *pw;
int running = 0, rc, i, rlen, found;
static int LOADhi = FALSE, oldmin = 70, olddo = 70, oldsec = 70, tosswait = TOSSWAIT_TIME;
static int LOADhi = FALSE, oldmin = 70, olddo = 70, oldsec = 70;
char *cmd = NULL, opts[41], port[21];
static char doing[32], buf[2048];
time_t now;

View File

@@ -12,7 +12,6 @@
#define SLOWRUN 20
#define TMPNAME "TMP."
#define LCKNAME "LOCKTASK"
#define TOSSWAIT_TIME 30

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Keep track of server status
*
*****************************************************************************
* Copyright (C) 1997-2001
* Copyright (C) 1997-2003
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -51,12 +51,12 @@ int s_msglink = FALSE;
int s_newnews = FALSE;
int s_bbsopen = FALSE;
int s_do_inet = FALSE;
int tosswait = TOSSWAIT_TIME;
extern int UPSalarm;
extern int ptimer;
extern int rescan;
extern struct taskrec TCFG;
extern int internet;
extern int ZMH;
@@ -340,31 +340,33 @@ char *getseq(void)
int sem_set(char *sem, int value)
{
Syslog('s', "%s semafore \"%s\"", value?"Set":"Clear", sem);
Syslog('s', "%s semafore \"%s\"", value?"Set":"Clear", sem);
if (!strcmp(sem, "scanout")) {
s_scanout = value;
if (value)
rescan = TRUE;
} else if (!strcmp(sem, "mailout")) {
s_mailout = value;
} else if (!strcmp(sem, "mailin")) {
s_mailin = value;
} else if (!strcmp(sem, "mbindex")) {
s_index = value;
} else if (!strcmp(sem, "newnews")) {
s_newnews = value;
} else if (!strcmp(sem, "msglink")) {
s_msglink = value;
} else if (!strcmp(sem, "reqindex")) {
s_reqindex = value;
} else if (!strcmp(sem, "do_inet")) {
s_do_inet = value;
} else {
return FALSE;
}
ptimer = PAUSETIME;
return TRUE;
if (!strcmp(sem, "scanout")) {
s_scanout = value;
if (value)
rescan = TRUE;
} else if (!strcmp(sem, "mailout")) {
s_mailout = value;
} else if (!strcmp(sem, "mailin")) {
s_mailin = value;
if (value)
tosswait = TOSSWAIT_TIME;
} else if (!strcmp(sem, "mbindex")) {
s_index = value;
} else if (!strcmp(sem, "newnews")) {
s_newnews = value;
} else if (!strcmp(sem, "msglink")) {
s_msglink = value;
} else if (!strcmp(sem, "reqindex")) {
s_reqindex = value;
} else if (!strcmp(sem, "do_inet")) {
s_do_inet = value;
} else {
return FALSE;
}
ptimer = PAUSETIME;
return TRUE;
}

View File

@@ -1,9 +1,12 @@
/* $Id$ */
#ifndef _TASKSTAT_H
#define _TASKSTAT_H
/* $Id$ */
#define PAUSETIME 3
#define TOSSWAIT_TIME 30
void status_init(void); /* Initialize status module */
void stat_inc_clients(void); /* Increase connected clients */