mbout stat now also counts directory outbound files
This commit is contained in:
parent
7cb2fc2f54
commit
f75f5d6770
@ -22,6 +22,10 @@ v0.35.05 19-Oct-2002
|
|||||||
mbcico:
|
mbcico:
|
||||||
Fixed crash with incoming YooHoo session with bad password.
|
Fixed crash with incoming YooHoo session with bad password.
|
||||||
|
|
||||||
|
mbout:
|
||||||
|
The stat command now also shows what is on hold for a node
|
||||||
|
with an directory outbound (ftp node). Status is always hold.
|
||||||
|
|
||||||
mbmsg:
|
mbmsg:
|
||||||
The summary counters in the logfile are increased to 6 digits.
|
The summary counters in the logfile are increased to 6 digits.
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ int outstat()
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Check private outbound box for nodes in the setup.
|
* Check private outbound box for nodes in the setup.
|
||||||
|
* Also, check directory outbounds for FTP nodes.
|
||||||
*/
|
*/
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(temp, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
||||||
@ -160,6 +161,31 @@ int outstat()
|
|||||||
}
|
}
|
||||||
tidy_faddr(fa);
|
tidy_faddr(fa);
|
||||||
}
|
}
|
||||||
|
if ((nodes.Session_out == S_DIR) && strlen(nodes.Dir_out_path)) {
|
||||||
|
fa = fido2faddr(nodes.Aka[0]);
|
||||||
|
flavor = 'h'; /* Directory outbound files are always on hold */
|
||||||
|
Syslog('o', "checking directory path %s (%s)", nodes.Dir_out_path, ascfnode(fa, 0x2f));
|
||||||
|
if ((dp = opendir(nodes.Dir_out_path)) == NULL) {
|
||||||
|
Syslog('o', "\"%s\" cannot be opened, proceed", MBSE_SS(nodes.Dir_out_path));
|
||||||
|
} else {
|
||||||
|
while ((de = readdir(dp))) {
|
||||||
|
if (strcmp(de->d_name, ".") && strcmp(de->d_name, "..")) {
|
||||||
|
sprintf(temp, "%s/%s", nodes.Dir_out_path, de->d_name);
|
||||||
|
if (stat(temp, &sb) == 0) {
|
||||||
|
if (S_ISREG(sb.st_mode)) {
|
||||||
|
each(fa, flavor, 0, temp);
|
||||||
|
} else {
|
||||||
|
Syslog('o', "not a regular file");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
WriteError("Can't stat %s", temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir(dp);
|
||||||
|
}
|
||||||
|
tidy_faddr(fa);
|
||||||
|
}
|
||||||
fseek(fp, nodeshdr.filegrp + nodeshdr.mailgrp, SEEK_CUR);
|
fseek(fp, nodeshdr.filegrp + nodeshdr.mailgrp, SEEK_CUR);
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
Reference in New Issue
Block a user