Added extra check in mbfile check
This commit is contained in:
parent
2b0a088da4
commit
0e574d5a8d
@ -40,6 +40,8 @@ v0.51.4 11-Apr-2004
|
||||
mbfile:
|
||||
The toberep command now logs the toberep.data in the debug
|
||||
logfile.
|
||||
Mbfile check will abort if a header of a files database is
|
||||
corrupt.
|
||||
|
||||
mbnntp:
|
||||
New program, news server to read echomail with a news client.
|
||||
|
@ -190,7 +190,19 @@ void Check(void)
|
||||
fwrite(&fdbhdr, sizeof(fdbhdr), 1, pFile);
|
||||
} else {
|
||||
fread(&fdbhdr, sizeof(fdbhdr), 1, pFile);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't do any upgrade, so the header must be correct.
|
||||
*/
|
||||
if (fdbhdr.hdrsize != sizeof(fdbhdr)) {
|
||||
Syslog('+', "fAreas hdrsize is corrupt: %d", fdbhdr.hdrsize);
|
||||
return;
|
||||
}
|
||||
if (fdbhdr.recsize != sizeof(fdb)) {
|
||||
Syslog('+', "fAreas recordsize is corrupt: %d, expected %d", fdbhdr.recsize, sizeof(fdbhdr));
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Now start checking the files in the filedatabase
|
||||
|
Reference in New Issue
Block a user