Code cleanup
This commit is contained in:
parent
7df384eec8
commit
c8c54ea185
@ -73,11 +73,8 @@ extern int check_dupe;
|
||||
int ProcessTic(fa_list *sbl)
|
||||
{
|
||||
time_t Now, Fdate;
|
||||
int Age, First, Listed = FALSE;
|
||||
int DownLinks = 0;
|
||||
int MustRearc = FALSE;
|
||||
int UnPacked = FALSE, IsArchive = FALSE;
|
||||
int rc, i, j, k, File_Id = FALSE;
|
||||
int Age, First, Listed = FALSE, DownLinks = 0, MustRearc = FALSE;
|
||||
int UnPacked = FALSE, IsArchive = FALSE, rc, i, j, k, File_Id = FALSE;
|
||||
char *Temp, *unarc = NULL, *cmd = NULL;
|
||||
char temp1[PATH_MAX], temp2[PATH_MAX], sbe[24], TDesc[256];
|
||||
unsigned long crc, crc2, Kb;
|
||||
@ -184,11 +181,8 @@ int ProcessTic(fa_list *sbl)
|
||||
while (GetTicSystem(&Link, First)) {
|
||||
First = FALSE;
|
||||
if (Link.aka.zone) {
|
||||
if ((Link.aka.zone == TIC.Aka.zone) &&
|
||||
(Link.aka.net == TIC.Aka.net) &&
|
||||
(Link.aka.node == TIC.Aka.node) &&
|
||||
(Link.aka.point== TIC.Aka.point) &&
|
||||
(Link.receivefrom))
|
||||
if ((Link.aka.zone == TIC.Aka.zone) && (Link.aka.net == TIC.Aka.net) &&
|
||||
(Link.aka.node == TIC.Aka.node) && (Link.aka.point== TIC.Aka.point) && (Link.receivefrom))
|
||||
Listed = TRUE;
|
||||
}
|
||||
}
|
||||
@ -332,8 +326,7 @@ int ProcessTic(fa_list *sbl)
|
||||
FwdSize = fgroup.UnitSize;
|
||||
|
||||
/*
|
||||
* If FwdSize <> 0 then calculate per size, else
|
||||
* charge for each file.
|
||||
* If FwdSize <> 0 then calculate per size, else charge for each file.
|
||||
*/
|
||||
if (FwdSize)
|
||||
TIC.FileCost = ((TIC.FileSize / 1024) / FwdSize) * FwdCost;
|
||||
@ -426,8 +419,7 @@ int ProcessTic(fa_list *sbl)
|
||||
if ((tic.VirScan || MustRearc) && IsArchive) {
|
||||
|
||||
/*
|
||||
* Check if there is a temp directory for the archive
|
||||
* conversion.
|
||||
* Check if there is a temp directory for the archive conversion.
|
||||
*/
|
||||
sprintf(temp2, "%s/tmp/arc", getenv("MBSE_ROOT"));
|
||||
if ((access(temp2, R_OK)) != 0) {
|
||||
@ -562,14 +554,12 @@ int ProcessTic(fa_list *sbl)
|
||||
sprintf(temp1, "%s/tmp", getenv("MBSE_ROOT"));
|
||||
chdir(temp1);
|
||||
sprintf(temp1, "%s/%s FILE_ID.DIZ", TIC.Inbound, TIC.RealName);
|
||||
if (execute(cmd, temp1, (char *)NULL, (char *)"/dev/null",
|
||||
(char *)"/dev/null", (char *)"/dev/null") == 0) {
|
||||
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.RealName);
|
||||
if (execute(cmd, temp1, (char *)NULL, (char *)"/dev/null",
|
||||
(char *)"/dev/null", (char *)"/dev/null") == 0) {
|
||||
if (execute(cmd, temp1, (char *)NULL, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) {
|
||||
sync();
|
||||
File_Id = TRUE;
|
||||
}
|
||||
@ -592,8 +582,7 @@ int ProcessTic(fa_list *sbl)
|
||||
TIC.File_Id_Ct = TIC.TicIn.TotLDesc;
|
||||
} else {
|
||||
/*
|
||||
* Format the description line (max 255 chars)
|
||||
* in parts of 48 characters.
|
||||
* Format the description line (max 255 chars) in parts of 48 characters.
|
||||
*/
|
||||
if (strlen(TIC.TicIn.Desc) <= 48) {
|
||||
strcpy(TIC.File_Id[0], TIC.TicIn.Desc);
|
||||
@ -640,8 +629,7 @@ int ProcessTic(fa_list *sbl)
|
||||
T_File.Size = TIC.FileSize;
|
||||
T_File.SizeKb = TIC.FileSize / 1024;
|
||||
/*
|
||||
* Calculate the CRC if we must send the new
|
||||
* archived file.
|
||||
* Calculate the CRC if we must send the new archived file.
|
||||
*/
|
||||
if (!TIC.SendOrg) {
|
||||
ReCalcCrc(temp1);
|
||||
|
Reference in New Issue
Block a user