Updates for directory tossing
This commit is contained in:
parent
db83218bc7
commit
b314568630
@ -75,6 +75,8 @@ v0.35.05 19-Oct-2002
|
|||||||
If filenames were exhausted and the last one (ending on z) is
|
If filenames were exhausted and the last one (ending on z) is
|
||||||
truncated in the outbound (has been sent already) it is erased
|
truncated in the outbound (has been sent already) it is erased
|
||||||
before the archiver is called to reuse that filename again.
|
before the archiver is called to reuse that filename again.
|
||||||
|
When mail/files were moved to the inbound from a directory
|
||||||
|
node, this was not processed in the same session.
|
||||||
|
|
||||||
mbtask:
|
mbtask:
|
||||||
Removed debug logging of "does" info.
|
Removed debug logging of "does" info.
|
||||||
|
@ -140,13 +140,18 @@ void remlock(char *lockfile, int create, int loglvl)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void dirinbound(void)
|
/*
|
||||||
|
* Process directory inbound. Return TRUE if something is moved
|
||||||
|
* to the inbound for processing.
|
||||||
|
*/
|
||||||
|
int dirinbound(void)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char *temp, *from, *too;
|
char *temp, *from, *too;
|
||||||
long fileptr;
|
long fileptr;
|
||||||
struct dirent *de;
|
struct dirent *de;
|
||||||
DIR *dp;
|
DIR *dp;
|
||||||
|
int Something = FALSE;
|
||||||
|
|
||||||
Syslog('m', "Starting directory inbound sessions");
|
Syslog('m', "Starting directory inbound sessions");
|
||||||
|
|
||||||
@ -188,6 +193,9 @@ void dirinbound(void)
|
|||||||
Syslog('m', "Move %s to %s", from, too);
|
Syslog('m', "Move %s to %s", from, too);
|
||||||
if (file_mv(from, too)) {
|
if (file_mv(from, too)) {
|
||||||
WriteError("$Move %s to %s failed", from, too);
|
WriteError("$Move %s to %s failed", from, too);
|
||||||
|
} else {
|
||||||
|
Something = TRUE;
|
||||||
|
Syslog('+', "Moved \"%s\" to %s", de->d_name, do_unprot ? CFG.inbound : CFG.pinbound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -211,6 +219,7 @@ void dirinbound(void)
|
|||||||
}
|
}
|
||||||
free(temp);
|
free(temp);
|
||||||
Syslog('m', "Finished directory inbound sessions");
|
Syslog('m', "Finished directory inbound sessions");
|
||||||
|
return Something;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,6 +7,6 @@
|
|||||||
int islocked(char *, int, int, int); /* Is directory locked */
|
int islocked(char *, int, int, int); /* Is directory locked */
|
||||||
int setlock(char *, int, int); /* Lock directory */
|
int setlock(char *, int, int); /* Lock directory */
|
||||||
void remlock(char *, int, int); /* Unlock directory */
|
void remlock(char *, int, int); /* Unlock directory */
|
||||||
void dirinbound(void); /* Process nodes */
|
int dirinbound(void); /* Process nodes */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -566,7 +566,28 @@ int main(int argc, char **argv)
|
|||||||
/*
|
/*
|
||||||
* Do inbound direcory sessions
|
* Do inbound direcory sessions
|
||||||
*/
|
*/
|
||||||
dirinbound();
|
if (dirinbound()) {
|
||||||
|
if (do_tic) {
|
||||||
|
/*
|
||||||
|
* Hatch new files and process .tic files
|
||||||
|
* until nothing left to do.
|
||||||
|
*/
|
||||||
|
Loop = TRUE;
|
||||||
|
do {
|
||||||
|
Hatch();
|
||||||
|
switch (Tic()) {
|
||||||
|
case -1: die(MBERR_OK);
|
||||||
|
break;
|
||||||
|
case 0: Loop = FALSE;
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
} while (Loop);
|
||||||
|
}
|
||||||
|
if (do_toss) {
|
||||||
|
TossMail();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!do_uucp)
|
if (!do_uucp)
|
||||||
newspost();
|
newspost();
|
||||||
|
Reference in New Issue
Block a user