Lost of changes

This commit is contained in:
Michiel Broek
2004-01-25 10:57:35 +00:00
parent 1382701bd8
commit 5a0e317f23
41 changed files with 762 additions and 604 deletions

View File

@@ -89,7 +89,7 @@ static int alias_db_init(void)
while (fcntl(fileno(afp), F_SETLK, &txflock) != 0) {
if (tries > 4)
Syslog('+', "Alias database locked %d errno=%d %s", tries +1, errno, strerror(errno));
usleep(250000);
msleep(250);
if (++tries >= 60) {
fclose(afp);
afp = NULL;

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Announce new files and FileFind
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -127,7 +127,7 @@ void Uploads()
i++;
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
if ((area.Available) && strlen(area.NewGroup)) {
@@ -321,7 +321,7 @@ long Report(gr_list *ta, long filepos)
if ((!strcmp(T_File.Echo, ta->echo)) && (!strcmp(T_File.Group, ta->group))) {
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
/*
* Report one newfile, first line.

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Announce new files and FileFind
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -117,7 +117,7 @@ void ScanArea(ff_list **ffl)
}
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
if (Msg_ReadHeader(Number) == TRUE) {
if (((!strcasecmp(Msg.To, "allfix")) || (!strcasecmp(Msg.To, "filefind"))) && (!Msg.Received)) {
@@ -288,7 +288,7 @@ void ScanFiles(ff_list *tmp)
Nopper();
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
if (!do_quiet) {
printf("%6lu / %6lu", areanr, found);

View File

@@ -4,7 +4,7 @@
* Purpose: File Database Maintenance - Build index for request processor
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -478,7 +478,7 @@ void ReqIndex(void)
*/
x++;
if (CFG.slow_util && do_quiet && ((x % 3) == 0))
usleep(1);
msleep(1);
for (z = 0; z <= 25; z++) {
if (strlen(file.Desc[z])) {
@@ -658,7 +658,7 @@ void HtmlIndex(char *Lang)
TotalHtml++;
aTotal++;
if (CFG.slow_util && do_quiet && ((x % 3) == 0))
usleep(1);
msleep(1);
MacroVars("efghijklm", "ddsssssds", 0, 0, "", "", "", "", "", 0, "");
MacroVars("e", "d", aTotal);

View File

@@ -152,7 +152,7 @@ void Marker(void)
* Release system resources when running in the background
*/
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
if (do_quiet)
return;

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Nodelist Compiler
*
*****************************************************************************
* Copyright (C) 1997-2003
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -374,10 +374,10 @@ int compile(char *nlname, unsigned short zo, unsigned short ne, unsigned short n
if (CFG.slow_util && do_quiet) {
if (zo) {
usleep(1);
msleep(1);
} else {
if ((lineno % 40) == 0)
usleep(1);
msleep(1);
}
}

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Message Base Maintenance
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -475,7 +475,7 @@ void KillArea(char *Path, char *Name, int DaysOld, int MaxMsgs, long Areanr)
do {
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
if ((!do_quiet) && ((Counter % 10L) == 0)) {
printf("%6lu / %6lu\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b", Counter, TotalMsgs);
@@ -587,7 +587,7 @@ void PackArea(char *Path, long Areanr)
}
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
}

View File

@@ -4,7 +4,7 @@
* Purpose ...............: AreaMgr and FileMgr utilities.
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -589,7 +589,7 @@ int Areas(void)
for (tmp = alist; tmp; tmp = tmp->next) {
fseek(fp, msgshdr.hdrsize, SEEK_SET);
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
while (fread(&msgs, msgshdr.recsize, 1, fp) == 1) {
if (msgs.Active && !strcmp(msgs.Group, mgroup.Name) && !strcmp(msgs.Tag, tmp->Name))
tmp->IsPresent = TRUE;
@@ -639,7 +639,7 @@ int Areas(void)
}
cmd = xstrcat(cmd, tmp->Name);
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
}
}
@@ -658,7 +658,7 @@ int Areas(void)
fseek(fp, msgshdr.hdrsize, SEEK_SET);
Syslog('m', "Delete %s", tmp->Name);
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
while (fread(&msgs, msgshdr.recsize, 1, fp) == 1) {
if (msgs.Active && !strcmp(msgs.Group, mgroup.Name) && !strcmp(msgs.Tag, tmp->Name)) {
fseek(fp, - msgshdr.recsize, SEEK_CUR);
@@ -828,7 +828,7 @@ int Areas(void)
for (tmp = alist; tmp; tmp = tmp->next) {
fseek(fp, tichdr.hdrsize, SEEK_SET);
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
while (fread(&tic, tichdr.recsize, 1, fp) == 1) {
if (tic.Active && !strcmp(tic.Group, fgroup.Name) && !strcmp(tic.Name, tmp->Name))
tmp->IsPresent = TRUE;
@@ -886,7 +886,7 @@ int Areas(void)
}
cmd = xstrcat(cmd, tmp->Name);
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
}
}
@@ -907,7 +907,7 @@ int Areas(void)
fseek(fp, tichdr.hdrsize, SEEK_SET);
Syslog('f', "Delete %s", tmp->Name);
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
while (fread(&tic, tichdr.recsize, 1, fp) == 1) {
if (tic.Active && !strcmp(tic.Group, fgroup.Name) && !strcmp(tic.Name, tmp->Name)) {
fseek(fp, - tichdr.recsize, SEEK_CUR);

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Statistic rollover util.
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -65,7 +65,7 @@ void RollWeek(statcnt *S)
S->tweek = 0L;
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
}
@@ -158,7 +158,7 @@ void Rollover()
nodes.MailSent.month[Miy] = 0;
nodes.MailRcvd.month[Miy] = 0;
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
}
fseek(fp, - nodeshdr.recsize, SEEK_CUR);
fwrite(&nodes, nodeshdr.recsize, 1, fp);
@@ -199,7 +199,7 @@ void Rollover()
msgs.Received.month[Miy] = 0;
msgs.Posted.month[Miy] = 0;
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
}
fseek(fp, - msgshdr.recsize, SEEK_CUR);
fwrite(&msgs, msgshdr.recsize, 1, fp);
@@ -239,7 +239,7 @@ void Rollover()
mgroup.MsgsRcvd.month[Miy] = 0;
mgroup.MsgsSent.month[Miy] = 0;
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
}
fseek(fp, - mgrouphdr.recsize, SEEK_CUR);
fwrite(&mgroup, mgrouphdr.recsize, 1, fp);
@@ -278,7 +278,7 @@ void Rollover()
tic.Files.month[Miy] = 0;
tic.KBytes.month[Miy] = 0;
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
}
fseek(fp, - tichdr.recsize, SEEK_CUR);
fwrite(&tic, tichdr.recsize, 1, fp);
@@ -318,7 +318,7 @@ void Rollover()
fgroup.Files.month[Miy] = 0;
fgroup.KBytes.month[Miy] = 0;
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
}
fseek(fp, - fgrouphdr.recsize, SEEK_CUR);
fwrite(&fgroup, fgrouphdr.recsize, 1, fp);
@@ -354,7 +354,7 @@ void Rollover()
if (do_month) {
hatch.Hatched.month[Miy] = 0;
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
}
fseek(fp, - hatchhdr.recsize, SEEK_CUR);
fwrite(&hatch, hatchhdr.recsize, 1, fp);

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Scan for outgoing mail.
*
*****************************************************************************
* Copyright (C) 1997-2003
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -182,7 +182,7 @@ void ScanFull()
do {
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
if (((Number % 10) == 0) && (!do_quiet)) {
printf("%6lu\b\b\b\b\b\b", Number);
@@ -245,7 +245,7 @@ void ScanFull()
do {
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
if (((Number % 10) == 0) && (!do_quiet)) {
printf("%6lu\b\b\b\b\b\b", Number);

View File

@@ -464,7 +464,7 @@ int get_xover(char *grpname, long startnr, long endnr, List **art)
fill_artlist(art, ptr, nr, dupe);
free(p);
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
}
}
}

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Process .tic files
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -169,7 +169,7 @@ int LoadTic(char *inb, char *tfn)
fa_list *sbl = NULL;
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
memset(&RealName, 0, sizeof(RealName));
memset(&TIC, 0, sizeof(TIC));

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Toss a single *.pkt file
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -156,7 +156,7 @@ int importmsg(faddr *p_from, faddr *f, faddr *t, char *orig, char *subj, time_t
sysconnect Link;
if (CFG.slow_util && do_quiet)
usleep(1);
msleep(1);
memset(&Link, 0, sizeof(Link));