Changed areas command logging

This commit is contained in:
Michiel Broek 2002-12-07 15:34:28 +00:00
parent 2cebb3e9d5
commit f8cee18f1b
4 changed files with 38 additions and 13 deletions

View File

@ -49,6 +49,8 @@ v0.35.06
then what MS does.
Added long extension to 3 char extensions for mpeg, smil, perl,
jpeg and tiff.
The unpack function doesn't complain anymore when it was
testing for the archive format on files smaller then 257 bytes.
mbsebbs:
Several user input functions don't allow comma's anymore.
@ -74,6 +76,9 @@ v0.35.06
lines now depends on the new nodes setting.
When adding unpacked mail for a directory node, the mail
packets had the wrong filename.
Changed some logging to debug with auto create areas.
Request messages sent to the uplinks are now logged in the
manager logfile.
mbcico:
With filetransfer errors, the attempts counter was not

View File

@ -156,9 +156,12 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
*/
fseek(mp, 0, SEEK_END);
offset = msgshdr.hdrsize + ((mgroup.StartArea -1) * (msgshdr.recsize + msgshdr.syssize));
Syslog('+', "file end at %ld, offset needed %ld", ftell(mp), offset);
Syslog('m', "file end at %ld, start area offset at %ld", ftell(mp), offset);
if (ftell(mp) < offset) {
/*
* Start area record not in database, expand until start record exists.
*/
Syslog('m', "Database too small, expanding...");
memset(&msgs, 0, sizeof(msgs));
memset(&System, 0, sizeof(System));

View File

@ -309,8 +309,8 @@ int UplinkRequest(faddr *t, faddr *From, int FileMgr, char *cmd)
struct tm *tm;
fidoaddr Orig, Dest;
unsigned flags = M_PVT;
char ext[4], *mgrname, *subj;
int i;
char ext[4], *mgrname, *subj, cmdline[81];
int i, j;
memset(&Orig, 0, sizeof(Orig));
Orig.zone = From->zone;
@ -351,7 +351,7 @@ int UplinkRequest(faddr *t, faddr *From, int FileMgr, char *cmd)
}
subj = xstrcpy(nodes.Apasswd);
Syslog('-', " Netmail from %s to %s", aka2str(Orig), ascfnode(t, 0x1f));
Mgrlog("%s request from %s to %s", mgrname, aka2str(Orig), ascfnode(t, 0x1f));
Now = time(NULL) - (gmt_offset((time_t)0) * 60);
flags |= (nodes.Crash) ? M_CRASH : 0;
@ -396,10 +396,27 @@ int UplinkRequest(faddr *t, faddr *From, int FileMgr, char *cmd)
fprintf(qp, "\001PID: MBSE-FIDO %s\r", VERSION);
fprintf(qp, "\001TZUTC: %s\r", gmtoffset(Now));
for (i = 0; i < strlen(cmd); i++)
/*
* Send command, may be format *AREA1\r+AREA2\r=AREA3
*/
j = 0;
for (i = 0; i < strlen(cmd); i++) {
putc(cmd[i], qp);
putc('\r', qp);
if (cmd[i] == '\r') {
cmdline[j] = '\0';
Mgrlog("%s", cmdline);
j = 0;
} else {
cmdline[j] = cmd[i];
j++;
}
}
putc('\r', qp); /* There is no return after the last one. */
cmdline[j] = '\0';
Mgrlog("%s", cmdline);
Mgrlog("---");
fprintf(qp, TearLine());
/*
* Add a warning after the tearline.
*/
@ -501,6 +518,12 @@ void fill_arealist(AreaList **fdp, char *tag, int DoDelete)
/*
* Process areas commandline. Check for missing records in message and
* file groups or areas dropped from the area taglists. Supported taglists
* are plain areaname description lists and for file areas the filegate.zxx
* formatted lists.
*/
int Areas(void)
{
FILE *gp, *ap, *fp;
@ -510,7 +533,7 @@ int Areas(void)
sysconnect System;
faddr *From, *To;
Mgrlog("Process areas taglists");
Syslog('+', "Process areas taglists");
if (!do_quiet) {
colour(3, 0);

View File

@ -86,7 +86,6 @@ int ProcessTic(fa_list *sbl)
int BBS_Imp = FALSE, DidBanner = FALSE;
faddr *p_from;
qualify *qal = NULL, *tmpq;
fa_list *tmp;
Now = time(NULL);
@ -301,9 +300,6 @@ int ProcessTic(fa_list *sbl)
}
}
for (tmp = sbl; tmp; tmp = tmp->next)
Syslog('f', "initial SB list %s", ascfnode(tmp->addr, 0x0f));
/*
* Count the actual downlinks for this area and build the list of
* systems qualified to receive this file.
@ -730,13 +726,11 @@ int ProcessTic(fa_list *sbl)
* Create file announce record
*/
if (tic.FileArea) {
Syslog('f', "Start magic check");
if (strlen(TIC.TicIn.Magic))
UpDateAlias(TIC.TicIn.Magic);
else
Magic_UpDateAlias();
Syslog('f', "done");
for (i = 0; i <= TIC.File_Id_Ct; i++)
strncpy(T_File.LDesc[i], TIC.File_Id[i], 48);
T_File.TotLdesc = TIC.File_Id_Ct;