Removed some sync calls

This commit is contained in:
Michiel Broek 2004-01-18 13:28:25 +00:00
parent 6e1108f1b3
commit baa8a4d09f
8 changed files with 21 additions and 22 deletions

View File

@ -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

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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;
}

View File

@ -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;

View File

@ -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) {

View File

@ -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);