Fixed Sparc problem in mbtask, added one installdir to main Makefile
This commit is contained in:
parent
12702344eb
commit
00f8a7d81a
@ -4124,6 +4124,7 @@ v0.33.18 27-Jul-2001
|
||||
and scanout in the semafore directory.
|
||||
Removes stale socket file if found.
|
||||
Runs mbsetup init if config.data is created on new systems.
|
||||
Fixed a SIGBUS fault for Sparc systems
|
||||
|
||||
mbpasswd:
|
||||
Added CLOSE_SESSIONS and ENV_ROOTPATH to getdef to prevent new
|
||||
|
@ -93,6 +93,7 @@ install-exec-local:
|
||||
$(mkinstalldirs) /var/spool/mbse/unknown ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/inbound ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/outbound ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/msgs; \
|
||||
$(mkinstalldirs) /var/spool/mbse/badtic ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/ticqueue ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/ftp ; \
|
||||
|
388
config.h.in
388
config.h.in
@ -1,87 +1,33 @@
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
/* acconfig.h for the MBSE BBS package */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
#undef const
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef gid_t
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
#undef HAVE_DOPRNT
|
||||
|
||||
/* Define if your system has a working fnmatch function. */
|
||||
#undef HAVE_FNMATCH
|
||||
|
||||
/* Define if your struct stat has st_blksize. */
|
||||
#undef HAVE_ST_BLKSIZE
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
#undef HAVE_STRFTIME
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Define if your struct tm has tm_zone. */
|
||||
#undef HAVE_TM_ZONE
|
||||
|
||||
/* Define if you don't have tm_zone but do have the external array
|
||||
tzname. */
|
||||
#undef HAVE_TZNAME
|
||||
|
||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
||||
#undef HAVE_UTIME_NULL
|
||||
|
||||
/* Define if you have <vfork.h>. */
|
||||
#undef HAVE_VFORK_H
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef mode_t
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define if the `setpgrp' function takes no argument. */
|
||||
#undef SETPGRP_VOID
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
#undef STAT_MACROS_BROKEN
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define if your <sys/time.h> declares struct tm. */
|
||||
#undef TM_IN_SYS_TIME
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef uid_t
|
||||
|
||||
/* Define vfork as fork if vfork does not work. */
|
||||
#undef vfork
|
||||
|
||||
/* Define if lex declares yytext as a char * by default, not a char[]. */
|
||||
#undef YYTEXT_POINTER
|
||||
#define AUTHOR @COPYRIGHT@
|
||||
|
||||
/* Memory debugging */
|
||||
#undef MEMWATCH
|
||||
|
||||
/* Has strcasestr function */
|
||||
#undef HAVE_STRCASESTR
|
||||
|
||||
/* Has mkstemp function */
|
||||
#undef HAVE_MKSTEMP
|
||||
|
||||
/* If you have gettimeofday function */
|
||||
#undef HAVE_DECLARED_TIMEZONE
|
||||
#undef HAVE_TM_GMTOFF
|
||||
|
||||
/* If you don't have pid_t */
|
||||
#undef DONT_HAVE_PID_T
|
||||
|
||||
/* Believe ZFIN */
|
||||
#undef BELEIVE_ZFIN
|
||||
|
||||
/* NOPROTO in lhash.h ??? */
|
||||
#undef NOPROTO
|
||||
|
||||
/* No Hash Comp function */
|
||||
#undef NO_HASH_COMP
|
||||
|
||||
/* News postings */
|
||||
#undef RESTAMP_FUTURE_POSTINGS
|
||||
#undef RESTAMP_OLD_POSTINGS
|
||||
@ -110,127 +56,164 @@
|
||||
#undef PAM
|
||||
#undef SW_CRYPT
|
||||
|
||||
/* Define if you have the a64l function. */
|
||||
|
||||
/* That's it */
|
||||
|
||||
/* Define if you have the `a64l' function. */
|
||||
#undef HAVE_A64L
|
||||
|
||||
/* Define if you have the c64i function. */
|
||||
/* Define if you have the `c64i' function. */
|
||||
#undef HAVE_C64I
|
||||
|
||||
/* Define if you have the fchmod function. */
|
||||
#undef HAVE_FCHMOD
|
||||
|
||||
/* Define if you have the fchown function. */
|
||||
#undef HAVE_FCHOWN
|
||||
|
||||
/* Define if you have the fdatasync function. */
|
||||
#undef HAVE_FDATASYNC
|
||||
|
||||
/* Define if you have the fsync function. */
|
||||
#undef HAVE_FSYNC
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#undef HAVE_GETCWD
|
||||
|
||||
/* Define if you have the gethostname function. */
|
||||
#undef HAVE_GETHOSTNAME
|
||||
|
||||
/* Define if you have the gettimeofday function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define if you have the getwd function. */
|
||||
#undef HAVE_GETWD
|
||||
|
||||
/* Define if you have the lckpwdf function. */
|
||||
#undef HAVE_LCKPWDF
|
||||
|
||||
/* Define if you have the mkdir function. */
|
||||
#undef HAVE_MKDIR
|
||||
|
||||
/* Define if you have the mkstemp function. */
|
||||
#undef HAVE_MKSTEMP
|
||||
|
||||
/* Define if you have the mktime function. */
|
||||
#undef HAVE_MKTIME
|
||||
|
||||
/* Define if you have the putenv function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define if you have the putpwent function. */
|
||||
#undef HAVE_PUTPWENT
|
||||
|
||||
/* Define if you have the re_comp function. */
|
||||
#undef HAVE_RE_COMP
|
||||
|
||||
/* Define if you have the regcmp function. */
|
||||
#undef HAVE_REGCMP
|
||||
|
||||
/* Define if you have the regcomp function. */
|
||||
#undef HAVE_REGCOMP
|
||||
|
||||
/* Define if you have the rmdir function. */
|
||||
#undef HAVE_RMDIR
|
||||
|
||||
/* Define if you have the select function. */
|
||||
#undef HAVE_SELECT
|
||||
|
||||
/* Define if you have the socket function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define if you have the strcasestr function. */
|
||||
#undef HAVE_STRCASESTR
|
||||
|
||||
/* Define if you have the strcspn function. */
|
||||
#undef HAVE_STRCSPN
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define if you have the strerror function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you have the strspn function. */
|
||||
#undef HAVE_STRSPN
|
||||
|
||||
/* Define if you have the strstr function. */
|
||||
#undef HAVE_STRSTR
|
||||
|
||||
/* Define if you have the strtol function. */
|
||||
#undef HAVE_STRTOL
|
||||
|
||||
/* Define if you have the strtoul function. */
|
||||
#undef HAVE_STRTOUL
|
||||
|
||||
/* Define if you have the uname function. */
|
||||
#undef HAVE_UNAME
|
||||
|
||||
/* Define if you have the <crypt.h> header file. */
|
||||
#undef HAVE_CRYPT_H
|
||||
|
||||
/* Define if you have the <dirent.h> header file. */
|
||||
/* Define if you have the <dirent.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define if you don't have `vprintf' but do have `_doprnt.' */
|
||||
#undef HAVE_DOPRNT
|
||||
|
||||
/* Define if you have the `fchmod' function. */
|
||||
#undef HAVE_FCHMOD
|
||||
|
||||
/* Define if you have the `fchown' function. */
|
||||
#undef HAVE_FCHOWN
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define if you have the `fdatasync' function. */
|
||||
#undef HAVE_FDATASYNC
|
||||
|
||||
/* Define if your system has a working `fnmatch' function. */
|
||||
#undef HAVE_FNMATCH
|
||||
|
||||
/* Define if you have the `fsync' function. */
|
||||
#undef HAVE_FSYNC
|
||||
|
||||
/* Define if you have the `getcwd' function. */
|
||||
#undef HAVE_GETCWD
|
||||
|
||||
/* Define if you have the `gethostname' function. */
|
||||
#undef HAVE_GETHOSTNAME
|
||||
|
||||
/* Define if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define if you have the `getwd' function. */
|
||||
#undef HAVE_GETWD
|
||||
|
||||
/* Define if you have the <gshadow.h> header file. */
|
||||
#undef HAVE_GSHADOW_H
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the `lckpwdf' function. */
|
||||
#undef HAVE_LCKPWDF
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
/* Define if you have the <ndir.h> header file. */
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if you have the `mkdir' function. */
|
||||
#undef HAVE_MKDIR
|
||||
|
||||
/* Define if you have the `mkstemp' function. */
|
||||
#undef HAVE_MKSTEMP
|
||||
|
||||
/* Define if you have the `mktime' function. */
|
||||
#undef HAVE_MKTIME
|
||||
|
||||
/* Define if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define if you have the `putenv' function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define if you have the `putpwent' function. */
|
||||
#undef HAVE_PUTPWENT
|
||||
|
||||
/* Define if you have the `regcmp' function. */
|
||||
#undef HAVE_REGCMP
|
||||
|
||||
/* Define if you have the `regcomp' function. */
|
||||
#undef HAVE_REGCOMP
|
||||
|
||||
/* Define if you have the <regex.h> header file. */
|
||||
#undef HAVE_REGEX_H
|
||||
|
||||
/* Define if you have the `re_comp' function. */
|
||||
#undef HAVE_RE_COMP
|
||||
|
||||
/* Define if you have the `rmdir' function. */
|
||||
#undef HAVE_RMDIR
|
||||
|
||||
/* Define if you have the `select' function. */
|
||||
#undef HAVE_SELECT
|
||||
|
||||
/* Define if you have the <shadow.h> header file. */
|
||||
#undef HAVE_SHADOW_H
|
||||
|
||||
/* Define if you have the <sys/dir.h> header file. */
|
||||
/* Define if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define if you have the `strcasestr' function. */
|
||||
#undef HAVE_STRCASESTR
|
||||
|
||||
/* Define if you have the `strcspn' function. */
|
||||
#undef HAVE_STRCSPN
|
||||
|
||||
/* Define if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you have the `strftime' function. */
|
||||
#undef HAVE_STRFTIME
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define if you have the `strspn' function. */
|
||||
#undef HAVE_STRSPN
|
||||
|
||||
/* Define if you have the `strstr' function. */
|
||||
#undef HAVE_STRSTR
|
||||
|
||||
/* Define if you have the `strtol' function. */
|
||||
#undef HAVE_STRTOL
|
||||
|
||||
/* Define if you have the `strtoul' function. */
|
||||
#undef HAVE_STRTOUL
|
||||
|
||||
/* Define if `st_blksize' is member of `struct stat'. */
|
||||
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
|
||||
|
||||
/* Define if `tm_zone' is member of `struct tm'. */
|
||||
#undef HAVE_STRUCT_TM_TM_ZONE
|
||||
|
||||
/* Define if your `struct stat' has `st_blksize'. Deprecated, use
|
||||
`HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */
|
||||
#undef HAVE_ST_BLKSIZE
|
||||
|
||||
/* Define if you have the <syslog.h> header file. */
|
||||
#undef HAVE_SYSLOG_H
|
||||
|
||||
/* Define if you have the <sys/dir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
/* Define if you have the <sys/file.h> header file. */
|
||||
@ -239,7 +222,7 @@
|
||||
/* Define if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define if you have the <sys/ndir.h> header file. */
|
||||
/* Define if you have the <sys/ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define if you have the <sys/resource.h> header file. */
|
||||
@ -251,15 +234,26 @@
|
||||
/* Define if you have the <sys/vfs.h> header file. */
|
||||
#undef HAVE_SYS_VFS_H
|
||||
|
||||
/* Define if you have the <syslog.h> header file. */
|
||||
#undef HAVE_SYSLOG_H
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
#undef HAVE_TERMIOS_H
|
||||
|
||||
/* Define if your `struct tm' has `tm_zone'. Deprecated, use
|
||||
`HAVE_STRUCT_TM_TM_ZONE' instead. */
|
||||
#undef HAVE_TM_ZONE
|
||||
|
||||
/* Define if you don't have `tm_zone' but do have the external array `tzname'.
|
||||
*/
|
||||
#undef HAVE_TZNAME
|
||||
|
||||
/* Define if you have the <ulimit.h> header file. */
|
||||
#undef HAVE_ULIMIT_H
|
||||
|
||||
/* Define if you have the `uname' function. */
|
||||
#undef HAVE_UNAME
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
@ -269,9 +263,63 @@
|
||||
/* Define if you have the <utime.h> header file. */
|
||||
#undef HAVE_UTIME_H
|
||||
|
||||
/* Define if `utime(file, NULL)' sets file's timestamp to the present. */
|
||||
#undef HAVE_UTIME_NULL
|
||||
|
||||
/* Define if you have the <vfork.h> header file. */
|
||||
#undef HAVE_VFORK_H
|
||||
|
||||
/* Define if you have the `vprintf' function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define if the `setpgrp' function takes no argument. */
|
||||
#undef SETPGRP_VOID
|
||||
|
||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
#undef STAT_MACROS_BROKEN
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define if your <sys/time.h> declares `struct tm'. */
|
||||
#undef TM_IN_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define if `lex' declares `yytext' as a `char *' by default, not a `char[]'.
|
||||
*/
|
||||
#undef YYTEXT_POINTER
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef gid_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef mode_t
|
||||
|
||||
/* Define to `long' if <sys/types.h> does not define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef uid_t
|
||||
|
||||
/* Define as `fork' if `vfork' does not work. */
|
||||
#undef vfork
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbtask/mbtask.c
|
||||
* Purpose ...............: MBSE BBS Task Manager
|
||||
* Last modification date : 25-Oct-2001
|
||||
* Last modification date : 01-Nov-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -429,6 +429,7 @@ void load_taskcfg(void)
|
||||
sprintf(TCFG.cmd_msglink, "%s/bin/mbmsg link -quiet", getenv("MBSE_ROOT"));
|
||||
sprintf(TCFG.cmd_reqindex, "%s/bin/mbfile index -quiet", getenv("MBSE_ROOT"));
|
||||
TCFG.ipblocks = TRUE;
|
||||
TCFG.debug = FALSE;
|
||||
TCFG.max_pots = 1;
|
||||
TCFG.max_isdn = 0;
|
||||
TCFG.max_tcp = 0;
|
||||
@ -778,7 +779,13 @@ void ulocktask(void)
|
||||
# define icmp_type type
|
||||
# define icmp_code code
|
||||
# define icmp_cksum checksum
|
||||
# ifdef icmp_id
|
||||
# undef icmp_id
|
||||
# endif
|
||||
# define icmp_id un.echo.id
|
||||
# ifdef icmp_seq
|
||||
# undef icmp_seq
|
||||
# endif
|
||||
# define icmp_seq un.echo.sequence
|
||||
#endif
|
||||
|
||||
@ -1032,7 +1039,8 @@ void scheduler(void)
|
||||
struct passwd *pw;
|
||||
int running = 0, rc, rlen;
|
||||
int LOADhi = FALSE, oldmin = 70, olddo = 70;
|
||||
char *cmd = NULL, doing[32], buf[2048];
|
||||
char *cmd = NULL;
|
||||
static char doing[32], buf[2048];
|
||||
time_t now;
|
||||
struct tm *tm;
|
||||
FILE *fp;
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbtask/taskcomm.c
|
||||
* Purpose ...............: MBSE BBS Daemon
|
||||
* Last modification date : 05-Jul-2001
|
||||
* Last modification date : 01-Nov-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -27,14 +27,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with MB BBS; see the file COPYING. If not, write to the Free
|
||||
* Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*****************************************************************************
|
||||
*
|
||||
* This program uses the BSD IPC stream sockets mechanism. This is the
|
||||
* server program. You need an entry in /etc/services for tcp service
|
||||
* "mbse" on port 60180. Yes, this is 1 higher as for ifcico. You don't
|
||||
* need an entry in inetd.conf, because this program is written as a
|
||||
* daemon for fast access.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "libs.h"
|
||||
@ -442,11 +434,11 @@ void do_cmd(char *cmd)
|
||||
char buf[SS_BUFSIZE];
|
||||
int slen, tries = 0;
|
||||
|
||||
sprintf(buf, "%s", exe_cmd(cmd));
|
||||
if (logtrans) {
|
||||
if (logtrans)
|
||||
tasklog('-', "< %s", cmd);
|
||||
sprintf(buf, "%s", exe_cmd(cmd));
|
||||
if (logtrans)
|
||||
tasklog('-', "> %s", buf);
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
slen = sendto(sock, buf, strlen(buf), 0, &from, fromlen);
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbtask/taskstat.c
|
||||
* Purpose ...............: Keep track of server status
|
||||
* Last modification date : 30-Jul-2001
|
||||
* Last modification date : 31-Oct-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -139,17 +139,18 @@ void status_write(void);
|
||||
void status_write(void)
|
||||
{
|
||||
int d, stat_fd;
|
||||
struct tm ttm, ytm;
|
||||
struct tm *ttm, *ytm;
|
||||
time_t temp;
|
||||
|
||||
temp = time(NULL);
|
||||
ttm = *localtime(&temp);
|
||||
ytm = *localtime(&status.daily);
|
||||
ttm = localtime(&temp);
|
||||
temp = status.daily; // On a Sparc, first put the time in temp, then pass it to locattime.
|
||||
ytm = localtime(&temp);
|
||||
|
||||
/*
|
||||
* If we passed to the next day, zero the today counters
|
||||
*/
|
||||
if (ttm.tm_yday != ytm.tm_yday) {
|
||||
if (ttm->tm_yday != ytm->tm_yday) {
|
||||
tasklog('+', "Last days statistics:");
|
||||
tasklog('+', "Total clients : %lu", status.today.tot_clt);
|
||||
tasklog('+', "Peak clients : %lu", status.today.peak_clt);
|
||||
@ -161,11 +162,19 @@ void status_write(void)
|
||||
tasklog('+', "Zeroed todays status counters");
|
||||
}
|
||||
|
||||
stat_fd = open(stat_fn, O_RDWR);
|
||||
d = lseek(stat_fd, 0, SEEK_SET);
|
||||
if ((stat_fd = open(stat_fn, O_RDWR)) == -1) {
|
||||
tasklog('?', "$Error open statusfile %s", stat_fn);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((d = lseek(stat_fd, 0, SEEK_SET)) != 0) {
|
||||
tasklog('?', "$Error seeking in statusfile");
|
||||
return;
|
||||
}
|
||||
|
||||
d = write(stat_fd, &status, sizeof(status_r));
|
||||
if (d != sizeof(status_r))
|
||||
tasklog('?', "Error writing statusfile, only %d bytes", d);
|
||||
tasklog('?', "$Error writing statusfile, only %d bytes", d);
|
||||
|
||||
/*
|
||||
* CLose the statusfile
|
||||
|
Reference in New Issue
Block a user