Updates for mbtask and mbnntp
This commit is contained in:
parent
007b7b1d41
commit
9e9fec9912
@ -42,6 +42,10 @@ v0.51.4 11-Apr-2004
|
||||
a faked newsgroup name in echomail areas. Both settings are
|
||||
needed for the newsserver.
|
||||
|
||||
mbtask:
|
||||
Removed debug logging for the disk thread.
|
||||
Added mbnntp to the taskregs to count as a user program.
|
||||
|
||||
|
||||
v0.51.3 22-Mar-2003 - 11-Apr-2004
|
||||
|
||||
|
3
TODO
3
TODO
@ -29,9 +29,6 @@ libdiesel.a:
|
||||
U: Processed stringlines containing unbalanced " characters are not
|
||||
processed, instead the previous macro value will be returned.
|
||||
|
||||
libmsgbase.a:
|
||||
N: CRC fields are not filled.
|
||||
|
||||
mbsebbs:
|
||||
X: Better word wrapping or paragraph justification in editor.
|
||||
|
||||
|
@ -76,6 +76,25 @@ void die(int onsig)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Check if the system is available.
|
||||
*/
|
||||
int check_free(void);
|
||||
int check_free(void)
|
||||
{
|
||||
char buf[128];
|
||||
|
||||
strcpy(buf, SockR("SBBS:0;"));
|
||||
if (strncmp(buf, "100:2,1", 7) == 0) {
|
||||
Syslog('+', "The system is closed");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct passwd *pw;
|
||||
@ -131,8 +150,12 @@ int main(int argc, char *argv[])
|
||||
Syslog('s', "TCP connection: len=%d, family=%hd, port=%hu, addr=%s",
|
||||
addrlen,peeraddr.sin_family, peeraddr.sin_port, inet_ntoa(peeraddr.sin_addr));
|
||||
Syslog('+', "Incoming connection from %s", inet_ntoa(peeraddr.sin_addr));
|
||||
send_nntp("200 MBNNTP v%s server ready -- no posting allowed", VERSION);
|
||||
nntp();
|
||||
if (! check_free()) {
|
||||
send_nntp("400 Server closed");
|
||||
} else {
|
||||
send_nntp("200 MBNNTP v%s server ready -- posting allowed", VERSION);
|
||||
nntp();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,7 +185,7 @@ int get_nntp(char *buf, int max)
|
||||
/*
|
||||
* Timeout
|
||||
*/
|
||||
send_nntp("400 Service discontinued");
|
||||
send_nntp("400 Service discontinued, timeout");
|
||||
}
|
||||
Syslog('+', "Receiver status %s", ttystat[- c]);
|
||||
return c;
|
||||
@ -223,6 +246,10 @@ void nntp(void)
|
||||
continue;
|
||||
|
||||
Syslog('n', "< \"%s\"", printable(buf, 0));
|
||||
if (! check_free()) {
|
||||
send_nntp("400 server closed");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Process received command
|
||||
|
@ -401,14 +401,11 @@ void add_path(char *lpath)
|
||||
return;
|
||||
}
|
||||
|
||||
rpath = calloc(PATH_MAX, sizeof(char));
|
||||
mbt_realpath(lpath, rpath);
|
||||
Syslog('d', "realpath %s", MBSE_SS(rpath));
|
||||
rpath = calloc(PATH_MAX, sizeof(char));
|
||||
mbt_realpath(lpath, rpath);
|
||||
|
||||
if (lstat(rpath, &sb) == 0) {
|
||||
|
||||
Syslog('d', "add_path(%s)", rpath);
|
||||
|
||||
if (S_ISDIR(sb.st_mode)) {
|
||||
|
||||
#if defined(__linux__)
|
||||
@ -687,9 +684,9 @@ void *disk_thread(void)
|
||||
disk_run = FALSE;
|
||||
Syslog('+', "Disk thread stopped");
|
||||
pthread_exit(NULL);
|
||||
#if defined(__NetBSD__)
|
||||
|
||||
return NULL;
|
||||
#if defined(__NetBSD__)
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -489,7 +489,7 @@ char *reg_fre(void)
|
||||
if (reginfo[i].pid) {
|
||||
if ((!strncmp(reginfo[i].prg, "mbsebbs", 7)) ||
|
||||
(!strncmp(reginfo[i].prg, "mbnewusr", 8)) ||
|
||||
(!strncmp(reginfo[i].prg, "mbftpd", 6)))
|
||||
(!strncmp(reginfo[i].prg, "mbnntp", 6)))
|
||||
users++;
|
||||
|
||||
if ((!strncmp(reginfo[i].prg, "mbfido", 6)) ||
|
||||
|
Reference in New Issue
Block a user