Added debug info to Add_ToBeRep
This commit is contained in:
parent
531337c588
commit
c1766dd7fe
@ -25,6 +25,8 @@ v0.51.3 22-Mar-2003
|
|||||||
|
|
||||||
mbfido:
|
mbfido:
|
||||||
The area tags are now created in /opt/mbse/share/doc/tags.
|
The area tags are now created in /opt/mbse/share/doc/tags.
|
||||||
|
Added more debug info in Add_ToBeRep(), we still see double
|
||||||
|
announces of files like FP-DEF.ZIP.
|
||||||
|
|
||||||
mblogin:
|
mblogin:
|
||||||
Changed some defines for NetBSD 1.6.2
|
Changed some defines for NetBSD 1.6.2
|
||||||
|
@ -66,7 +66,7 @@ int Add_ToBeRep(struct _filerecord report)
|
|||||||
* If it's a later received file, update the record
|
* If it's a later received file, update the record
|
||||||
*/
|
*/
|
||||||
if (report.Fdate > Temp.Fdate) {
|
if (report.Fdate > Temp.Fdate) {
|
||||||
Syslog('f', "Add_ToBeRep this file is newer, update record");
|
Syslog('f', "Add_ToBeRep this file is newer, update record at position %d", ftell(tbr));
|
||||||
fseek(tbr, - sizeof(Temp), SEEK_SET);
|
fseek(tbr, - sizeof(Temp), SEEK_SET);
|
||||||
fwrite(&report, sizeof(report), 1, tbr);
|
fwrite(&report, sizeof(report), 1, tbr);
|
||||||
fclose(tbr);
|
fclose(tbr);
|
||||||
@ -77,14 +77,14 @@ int Add_ToBeRep(struct _filerecord report)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((strcmp(Temp.Name, report.Name) == 0) && (Temp.Fdate == T_File.Fdate)) {
|
if ((strcmp(Temp.Name, report.Name) == 0) && (Temp.Fdate == report.Fdate)) {
|
||||||
Syslog('f', "Add_ToBeRep record with same filename, but other area");
|
Syslog('f', "Add_ToBeRep record with same filename, but other area");
|
||||||
Found = TRUE;
|
Found = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Found) {
|
if (Found) {
|
||||||
Syslog('!', "File %s already in toberep.data", T_File.Name);
|
Syslog('!', "File %s already in toberep.data", report.Name);
|
||||||
fclose(tbr);
|
fclose(tbr);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -92,8 +92,8 @@ int Add_ToBeRep(struct _filerecord report)
|
|||||||
/*
|
/*
|
||||||
* Append record
|
* Append record
|
||||||
*/
|
*/
|
||||||
Syslog('f', "Add_ToBeRep append record");
|
Syslog('f', "Add_ToBeRep append record at position %ld", ftell(tbr));
|
||||||
fwrite(&T_File, sizeof(T_File), 1, tbr);
|
fwrite(&report, sizeof(report), 1, tbr);
|
||||||
fclose(tbr);
|
fclose(tbr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user