Merge branch 'from-hg'

This commit is contained in:
Robert James Clay
2011-08-16 19:05:23 -04:00
682 changed files with 5860 additions and 7741 deletions

View File

@@ -1,6 +1,6 @@
# Makefile for mbtask.
# Copyright (c) 1997-2001 by M. Broek.
# $Id$
# $Id: Makefile,v 1.43 2007/05/27 12:50:48 mbse Exp $
include ../Makefile.global

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* $Id$
* $Id: calllist.c,v 1.14 2006/05/22 12:09:15 mbse Exp $
* Purpose ...............: mbtask - calllist
*
*****************************************************************************

View File

@@ -1,4 +1,4 @@
/* $Id$ */
/* $Id: calllist.h,v 1.2 2005/10/11 20:49:49 mbse Exp $ */
#ifndef _CALLLIST_H
#define _CALLLIST_H

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* $Id$
* $Id: callstat.c,v 1.8 2006/01/30 22:27:03 mbse Exp $
* Purpose ...............: Read mailer last call status
*
*****************************************************************************

View File

@@ -1,7 +1,7 @@
#ifndef CALLSTAT_H
#define CALLSTAT_H
/* $Id$ */
/* $Id: callstat.h,v 1.5 2006/01/30 22:27:03 mbse Exp $ */
typedef struct _callstat {

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* $Id$
* $Id: crc.c,v 1.4 2005/12/17 16:35:10 mbse Exp $
* Purpose ...............: Crc32 calculations
*
*****************************************************************************

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id$
* Purpose ...............: MBSE BBS Task Manager
*
*****************************************************************************
* Copyright (C) 1997-2008
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -987,7 +986,7 @@ void check_sema(void)
void start_scheduler(int port)
{
struct passwd *pw;
char *cmd = NULL;
char *cmd = NULL, ipstr[INET6_ADDRSTRLEN];
if (nodaemon)
printf("init fidonet\n");
@@ -1037,10 +1036,14 @@ void start_scheduler(int port)
* Setup IBC socket
*/
if (Run_IBC) {
void *addr;
myaddr_in.sin_family = AF_INET;
myaddr_in.sin_addr.s_addr = INADDR_ANY;
myaddr_in.sin_port = port;
Syslog('+', "IBC: listen on %s, port %d", inet_ntoa(myaddr_in.sin_addr), ntohs(myaddr_in.sin_port));
addr = &(myaddr_in.sin_addr);
inet_ntop(AF_INET, addr, ipstr, sizeof ipstr);
Syslog('+', "IBC: listen on %s, port %d", ipstr, ntohs(myaddr_in.sin_port));
ibcsock = socket(AF_INET, SOCK_DGRAM, 0);
if (ibcsock == -1) {

View File

@@ -1,7 +1,7 @@
#ifndef _MBTASK_H
#define _MBTASK_H
/* $Id$ */
/* $Id: mbtask.h,v 1.12 2006/02/13 19:26:30 mbse Exp $ */
/*

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* $Id$
* $Id: outstat.c,v 1.61 2007/09/16 12:58:53 mbse Exp $
* Purpose ...............: mbtask - Scan mail outbound status
*
*****************************************************************************

View File

@@ -1,4 +1,4 @@
/* $Id$ */
/* $Id: outstat.h,v 1.9 2005/10/11 20:49:49 mbse Exp $ */
#ifndef _OUTSTAT_H
#define _OUTSTAT_H

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* $Id$
* $Id: pidinfo.c,v 1.1 2005/10/09 13:37:11 mbse Exp $
* Purpose ...............: Pid utilities
*
*****************************************************************************

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id$
* Purpose ...............: mbtask - ping functions
*
*****************************************************************************
* Copyright (C) 1997-2006
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -349,7 +348,7 @@ void check_ping(void)
ping_next = (time_t)(now + 20);
if (inet_aton(pingaddress, &paddr)) {
if (inet_pton(AF_INET, pingaddress, &paddr)) {
pingresult[pingnr - 1] = FALSE;
rc = ping_send(paddr);
if (rc) {

View File

@@ -1,7 +1,7 @@
#ifndef _PING_H
#define _PING_H
/* $Id$ */
/* $Id: ping.h,v 1.6 2006/02/13 19:26:30 mbse Exp $ */
/*
* Defines.

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id$
* Purpose ...............: mbtask - mode portlists
*
*****************************************************************************
* Copyright (C) 1997-2006
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -112,7 +111,6 @@ void load_ports()
{
FILE *fp;
pp_list new;
int stdflag;
char *p, *q, *capflags = NULL;
nodelist_modem **tmpm;
@@ -137,14 +135,11 @@ void load_ports()
strncpy(new.tty, ttyinfo.tty, 6);
capflags = xstrcpy((char *)"flags:");
stdflag = TRUE;
q = xstrcpy(ttyinfo.flags);
for (p = q; p; p = q) {
if ((q = strchr(p, ',')))
*q++ = '\0';
if ((strncasecmp(p, "U", 1) == 0) && (strlen(p) == 1)) {
stdflag = FALSE;
} else {
if (strncasecmp(p, "U", 1) || (strlen(p) != 1)) {
for (tmpm = &nl_pots; *tmpm; tmpm=&((*tmpm)->next))
if (strcasecmp(p, (*tmpm)->name) == 0) {
new.mflags |= (*tmpm)->value;

View File

@@ -1,7 +1,7 @@
#ifndef _PORTS_H
#define _PORTS_H
/* $Id$ */
/* $Id: ports.h,v 1.4 2006/02/04 13:39:51 mbse Exp $ */
/*

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* $Id$
* $Id: scanout.c,v 1.13 2007/09/24 18:44:42 mbse Exp $
* Purpose ...............: Outbound scanning
*
*****************************************************************************

View File

@@ -1,7 +1,7 @@
#ifndef SCANOUT_H
#define SCANOUT_H
/* $Id$ */
/* $Id: scanout.h,v 1.3 2002/06/24 20:34:08 mbroek Exp $ */
#define OUT_PKT 0

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* $Id$
* $Id: signame.c,v 1.10 2007/08/22 21:09:24 mbse Exp $
* Purpose ...............: Signal names
*
*****************************************************************************

View File

@@ -1,7 +1,7 @@
#ifndef _SIGNAME_H
#define _SIGNAME_H
/* $Id$ */
/* $Id: signame.h,v 1.3 2004/12/29 12:39:47 mbse Exp $ */
// char SigName[32][16];

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id$
* Purpose ...............: mbtask - chat server
*
*****************************************************************************
* Copyright (C) 1997-2006
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -455,23 +454,23 @@ void chat_connect_r(char *data, char *buf)
* Now put welcome message into the ringbuffer and report success.
*/
temp = calloc(81, sizeof(char));
snprintf(temp, 200, "MBSE BBS v%s chat server; type /help for help", VERSION);
snprintf(temp, 80, "MBSE BBS v%s chat server; type /help for help", VERSION);
system_msg(usr_list[i].pid, temp);
snprintf(temp, 200, "Welcome to the Internet BBS Chat Network");
snprintf(temp, 80, "Welcome to the Internet BBS Chat Network");
system_msg(usr_list[i].pid, temp);
snprintf(temp, 200, "Current connected servers:");
snprintf(temp, 80, "Current connected servers:");
system_msg(usr_list[i].pid, temp);
for (j = 0; j < MAXIBC_SRV; j++) {
if (strlen(srv_list[j].server)) {
snprintf(temp, 200, " %d user%s at '%s'",
snprintf(temp, 80, " %d user%s at '%s'",
srv_list[j].users, (srv_list[j].users == 1) ? " ":"s", srv_list[j].fullname);
system_msg(usr_list[i].pid, temp);
count += srv_list[j].users;
}
}
snprintf(temp, 200, "There %s %d user%s connected", (count != 1)?"are":"is", count, (count != 1)?"s":"");
snprintf(temp, 80, "There %s %d user%s connected", (count != 1)?"are":"is", count, (count != 1)?"s":"");
system_msg(usr_list[i].pid, temp);
snprintf(buf, 200, "100:0;");
snprintf(buf, 80, "100:0;");
free(realname);
free(nick);
free(temp);

View File

@@ -1,7 +1,7 @@
#ifndef _TASKCHAT_H
#define _TASKCHAT_H
/* $Id$ */
/* $Id: taskchat.h,v 1.10 2006/02/13 19:26:31 mbse Exp $ */
void chat_msg(char *, char *, char *);
void system_shout(const char *, ...);

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id$
* Purpose ...............: MBSE BBS Daemon
*
*****************************************************************************
* Copyright (C) 1997-2008
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -86,7 +85,7 @@ char *exe_cmd(char *in)
static char cmd[4];
static char token[SS_BUFSIZE];
static char ebuf[19];
static char *cnt, var1[16];
static char var1[16];
int result;
char *buf;
@@ -481,7 +480,7 @@ char *exe_cmd(char *in)
* 100:0;
*/
if (strncmp(cmd, "GMON", 4) == 0) {
cnt = strtok(token, ",");
strtok(token, ",");
strcpy(var1, strtok(NULL, ";"));
buf = calloc(SS_BUFSIZE, sizeof(char));
get_reginfo_r(atoi(var1), buf);
@@ -521,7 +520,7 @@ char *exe_cmd(char *in)
* 201:1,16;
*/
if (strncmp(cmd, "GLCR", 4) == 0) {
cnt = strtok(token, ",");
strtok(token, ",");
strcpy(var1, strtok(NULL, ";"));
buf = calloc(SS_BUFSIZE, sizeof(char));
get_lastcallerrec_r(atoi(var1), buf);

View File

@@ -1,7 +1,7 @@
#ifndef _TASKCOMM_H
#define _TASKCOMM_H
/* $Id$ */
/* $Id: taskcomm.h,v 1.4 2006/02/13 19:26:31 mbse Exp $ */
void do_cmd(char *);

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* $Id$
* $Id: taskdisk.c,v 1.35 2007/08/26 14:02:28 mbse Exp $
* Purpose ...............: Give status of all filesystems
*
*****************************************************************************

View File

@@ -1,7 +1,7 @@
#ifndef _TASKDISK_H
#define _TASKDISK_H
/* $Id$ */
/* $Id: taskdisk.h,v 1.6 2006/02/13 19:26:31 mbse Exp $ */
char *disk_reset(void); /* Reset disk tables */
void disk_check_r(char *, char *); /* Check space in Megabytes */

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* $Id$
* $Id: taskibc.c,v 1.132 2007/02/11 20:29:53 mbse Exp $
* Purpose ...............: mbtask - Internet BBS Chat (but it looks like...)
*
*****************************************************************************

View File

@@ -1,7 +1,7 @@
#ifndef _TASKIBC_H
#define _TASKIBC_H
/* $Id$ */
/* $Id: taskibc.h,v 1.28 2006/05/25 19:17:49 mbse Exp $ */
#define MAXIBC_NCS 50 /* Maximum Neighbour ChatServers */
#define MAXIBC_SRV 200 /* Maximum Servers in chatnetwork */

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* $Id$
* $Id: taskinfo.c,v 1.12 2006/01/30 22:27:03 mbse Exp $
* Purpose ...............: Give system information
*
*****************************************************************************

View File

@@ -1,7 +1,7 @@
#ifndef _TASKINFO_H
#define _TASKINFO_H
/* $Id$ */
/* $Id: taskinfo.h,v 1.3 2006/01/30 22:27:03 mbse Exp $ */
void get_sysinfo_r(char *); /* Get System Info */

View File

@@ -1,6 +1,6 @@
/*****************************************************************************
*
* $Id$
* $Id: taskregs.c,v 1.27 2006/06/10 11:59:02 mbse Exp $
* Purpose ...............: Buffers for registration information.
*
*****************************************************************************

View File

@@ -1,7 +1,7 @@
#ifndef _TASKREGS_H
#define _TASKREGS_H
/* $Id$ */
/* $Id: taskregs.h,v 1.10 2006/05/22 12:09:15 mbse Exp $ */
#define MAXCLIENT 100

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id$
* Purpose ...............: Keep track of server status
*
*****************************************************************************
* Copyright (C) 1997-2008
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -443,11 +442,11 @@ int sem_set(char *sem, int value)
void sem_status_r(char *data, char *buf)
{
char *cnt, *sem;
char *sem;
int value;
snprintf(buf, 40, "200:1,16;");
cnt = strtok(data, ",");
strtok(data, ",");
sem = strtok(NULL, ";");
if (!strcmp(sem, "scanout")) {

View File

@@ -1,7 +1,7 @@
#ifndef _TASKSTAT_H
#define _TASKSTAT_H
/* $Id$ */
/* $Id: taskstat.h,v 1.9 2008/02/10 13:29:42 mbse Exp $ */
#define PAUSETIME 3

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id$
* Purpose ...............: MBSE BBS Task Manager, utilities
*
*****************************************************************************
* Copyright (C) 1997-2006
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -356,7 +355,7 @@ int file_exist(char *path, int mode)
int mkdirs(char *name, mode_t mode)
{
char buf[PATH_MAX], *p, *q;
int rc, last = 0, oldmask;
int last = 0, oldmask;
memset(&buf, 0, sizeof(buf));
strncpy(buf, name, sizeof(buf)-1);
@@ -367,7 +366,7 @@ int mkdirs(char *name, mode_t mode)
oldmask = umask(000);
while ((q = strchr(p, '/'))) {
*q = '\0';
rc = mkdir(buf, mode);
mkdir(buf, mode);
last = errno;
*q = '/';
p = q+1;

View File

@@ -1,4 +1,4 @@
/* $Id$ */
/* $Id: taskutil.h,v 1.10 2006/03/06 19:55:10 mbse Exp $ */
#ifndef _TASKUTIL_H
#define _TASKUTIL_H