diff --git a/ChangeLog b/ChangeLog index 36f754f2..b5ee296b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,15 @@ v0.39.7 14-Jan-2004 and after running the external program to make sure diskbuffers are committed. + mbfido: + Removed sync calls that are now in execute. + + mbfile: + Removed sync calls that are now in execute. + + mbdiff: + Removed sync calls that are now in execute. + v0.39.6 11-Jan-2004 - 14-Jan-2004 diff --git a/mbfido/magic.c b/mbfido/magic.c index 0d266d3c..34279a43 100644 --- a/mbfido/magic.c +++ b/mbfido/magic.c @@ -4,7 +4,7 @@ * Purpose ...............: .TIC files magic processing. * ***************************************************************************** - * Copyright (C) 1997-2002 + * Copyright (C) 1997-2004 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -292,7 +292,6 @@ void Magic_UnpackFile(void) cmd = xstrcpy(archiver.munarc); if (strlen(cmd)) { rc = execute(cmd, Fn, (char *)NULL, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null"); - sync(); if (rc) WriteError("$Magic: unpack in %s, error %d", magic.Path, rc); else diff --git a/mbfido/mbdiff.c b/mbfido/mbdiff.c index c8ad3536..eb7e9b4e 100644 --- a/mbfido/mbdiff.c +++ b/mbfido/mbdiff.c @@ -293,7 +293,7 @@ int main(int argc, char **argv) } if (execute(cmd, nd, (char *)NULL, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null")) { - Syslog('!', "Warning: unpack error, trying again after a sync"); + WriteError("Warning: unpack error, trying again after a sync"); sync(); sleep(1); if (execute(cmd, nd, (char *)NULL, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null")) { @@ -307,7 +307,6 @@ int main(int argc, char **argv) } } free(cmd); - sync(); Match = FALSE; if ((dp = opendir(wrk)) != NULL) { @@ -417,7 +416,6 @@ int main(int argc, char **argv) else { CreateSema((char *)"mailin"); } - sync(); free(p); free(cmd); } diff --git a/mbfido/mbfido.c b/mbfido/mbfido.c index 29009fdf..8ecd566b 100644 --- a/mbfido/mbfido.c +++ b/mbfido/mbfido.c @@ -4,7 +4,7 @@ * Purpose: Process Fidonet style mail and files. * ***************************************************************************** - * Copyright (C) 1997-2002 + * Copyright (C) 1997-2004 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -690,7 +690,6 @@ int TossMail(void) if (checkspace(inbound, fname, UNPACK_FACTOR)) if ((rc = unpack(fname)) == 0) { files_ok++; - sync(); rc = TossPkts(); chdir(inbound); } else diff --git a/mbfido/mbfutil.c b/mbfido/mbfutil.c index 99fddc0f..178211be 100644 --- a/mbfido/mbfutil.c +++ b/mbfido/mbfutil.c @@ -4,7 +4,7 @@ * Purpose: File Database Maintenance - utilities * ***************************************************************************** - * Copyright (C) 1997-2003 + * Copyright (C) 1997-2004 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -292,14 +292,12 @@ int UnpackFile(char *File) free(temp); free(pwd); free(cmd); - sync(); return TRUE; } else { chdir(pwd); WriteError("Unpack error, file may be corrupt"); DeleteVirusWork(); } - sync(); return FALSE; } diff --git a/mbfido/ptic.c b/mbfido/ptic.c index fbffd090..2df7c2f6 100644 --- a/mbfido/ptic.c +++ b/mbfido/ptic.c @@ -4,7 +4,7 @@ * Purpose ...............: Process 1 .tic file * ***************************************************************************** - * Copyright (C) 1997-2002 + * Copyright (C) 1997-2004 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -488,7 +488,6 @@ int ProcessTic(fa_list *sbl) } else { sprintf(temp1, "%s/%s", TIC.Inbound, TIC.TicIn.File); if (execute(cmd, temp1, (char *)NULL, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) { - sync(); UnPacked = TRUE; } else { chdir(TIC.Inbound); @@ -574,12 +573,10 @@ int ProcessTic(fa_list *sbl) chdir(temp1); sprintf(temp1, "%s/%s FILE_ID.DIZ", TIC.Inbound, TIC.TicIn.File); if (execute(cmd, temp1, (char *)NULL, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) { - sync(); File_Id = TRUE; } else { sprintf(temp1, "%s/%s file_id.diz", TIC.Inbound, TIC.TicIn.File); if (execute(cmd, temp1, (char *)NULL, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) { - sync(); File_Id = TRUE; } } @@ -670,7 +667,6 @@ int ProcessTic(fa_list *sbl) if (execute(cmd, temp1, (char *)NULL, Temp, (char *)"/dev/null", (char *)"/dev/null")) { WriteError("$Changing the banner failed"); } else { - sync(); Syslog('+', "New banner %s", tic.Banner); TIC.FileSize = file_size(temp1); T_File.Size = TIC.FileSize; diff --git a/mbfido/queue.c b/mbfido/queue.c index 8647ebb5..05857607 100644 --- a/mbfido/queue.c +++ b/mbfido/queue.c @@ -4,7 +4,7 @@ * Purpose ...............: Mail and file queue operations * ***************************************************************************** - * Copyright (C) 1997-2002 + * Copyright (C) 1997-2004 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -392,7 +392,7 @@ void flush_dir(char *ndir) if (execute(archiver.marc, arcfile, fname, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) { unlink(fname); } else { - Syslog('+', "Create ARCmail failed, trying again after sync()"); + WriteError("Create ARCmail failed, trying again after sync()"); sync(); sleep(1); if (execute(archiver.marc, arcfile, fname, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) { diff --git a/mbfido/unpack.c b/mbfido/unpack.c index fe9448af..58104877 100644 --- a/mbfido/unpack.c +++ b/mbfido/unpack.c @@ -4,7 +4,7 @@ * Purpose ...............: Unpacker * ***************************************************************************** - * Copyright (C) 1997-2002 + * Copyright (C) 1997-2004 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -96,17 +96,17 @@ int unpack(char *fn) } if ((rc = execute(cmd,fn,(char *)NULL,(char*)"/dev/null",(char*)"/dev/null",(char*)"/dev/null")) == 0) { - sync(); +// sync(); unlink(fn); } else { sync(); sleep(1); - Syslog('!', "Warning: unpack %s failed, trying again after sync()", fn); + WriteError("Warning: unpack %s failed, trying again after sync()", fn); if ((rc = execute(cmd,fn,(char *)NULL,(char*)"/dev/null",(char*)"/dev/null",(char*)"/dev/null")) == 0) { - sync(); +// sync(); unlink(fn); } else { - sync(); +// sync(); strncpy(newname,fn,sizeof(newname)-1); strcpy(newname+8,".bad"); rename(fn,newname);