Code cleanup

This commit is contained in:
Michiel Broek 2004-07-11 15:13:07 +00:00
parent c854a40de6
commit 715932fe49
3 changed files with 26 additions and 1 deletions

View File

@ -3,6 +3,9 @@ $Id$
v0.61.2 11-Jul-2004
libmbse.a:
Added logging for obsolete .tic files in .flo files.
v0.61.1 20-Jun-2004 - 11-Jul-2004

7
TODO
View File

@ -63,6 +63,13 @@ newuser:
L: Allow handles to be the same as the unixname.
mbfido:
N: Check all .flo files for dead attachments.
N: Check all .flo files for to old attachments.
N: If a download file is deleted by keep # then check if the file(s)
are attached to nodes, if so delete the attachments and .tic files.
N: Count posted messages during mailscan.
N: Code cleanup and make a structure in this program. Remove duplicate

View File

@ -113,8 +113,23 @@ int attach(faddr noden, char *ofile, int mode, char flavor)
while (fgets(flofile, PATH_MAX -1, fp) != NULL) {
Striplf(flofile);
if (strncmp(flofile, thefile, strlen(thefile)) == 0) {
fclose(fp);
Syslog('+', "attach: file %s already attached", ofile);
/*
* If one of the next entries in the .flo file is a .tic file
* pointing to this file, we should remove that .tic file and
* mark the entry in the .flo as sent. For the file with this
* name, a new .tic file will be added.
*/
while (fgets(flofile, PATH_MAX -1, fp) != NULL) {
Striplf(flofile);
if (strstr(flofile, (char *)".tic")) {
/*
* Check this .tic file
*/
Syslog('f', "Should check %s to be deleted", flofile);
}
}
fclose(fp);
free(flofile);
free(thefile);
return TRUE;