Skip to Content.
Sympa Menu

devel - [sympa-dev] [lists@anomie.dhis.org: Bug#47543: Many 'Incorrect listname' messages]

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Raphael Hertzog <address@concealed>
  • To: address@concealed
  • Subject: [sympa-dev] [address@concealed: Bug#47543: Many 'Incorrect listname' messages]
  • Date: Sat, 16 Oct 1999 13:34:12 +0200

Hi everybody,

did someone else experience this problem ?

Anyway, the guy provided a patch. It would be cool that someone check
it and incorporate it if it's ok. It shouldn't hurt since it does only
remove the ^\..* files from some readdir ...

Thanks !
--
Raphaƫl Hertzog -=- http://tux.u-strasbg.fr/~raphael/
<pub> CDs Debian : http://tux.u-strasbg.fr/~raphael/debian/#cd </pub>
--- Begin Message ---
  • From: Brad <address@concealed>
  • To: address@concealed
  • Subject: Bug#47543: Many 'Incorrect listname' messages
  • Date: Sat, 16 Oct 1999 02:31:18 -0500 (CDT)
  • Resent-cc: Raphael Hertzog <address@concealed>
  • Resent-date: Sat, 16 Oct 1999 07:33:00 GMT
  • Resent-from: Brad <address@concealed>
  • Resent-to: address@concealed
Package: sympa
Version: 2.3.3-2

Once per minute, sympa logs a message 'Incorrect listname'. It also logs
two of these whenever a message is distributed or rejected from a
moderated list, and probably other times as well.

The once-per-minute appears to be due to an incorrect assumption that
there will always be a file available in SendDigest. When there isn't,
@dfile is empty and therefore <@dfile> at line 651 tries to read from
stdin. No valid listname can be read from stdin, so...

The other 'Incorrect listname' messages seem to be caused by failure to
eliminate the . and .. directory entries from the output of a readdir
call. Grepping through the /usr/lib/sympa/bin reveals 3 or 4 instances of
this.

The patch below seems to correct these bugs. (Tried to attach it the first
time, i thought the BTS now accepted mime messages...)



diff -u old/Commands.pm new/Commands.pm
--- old/Commands.pm Sat Oct 16 01:43:29 1999
+++ new/Commands.pm Sat Oct 16 01:55:54 1999
@@ -995,7 +995,7 @@
if (!opendir(DIR, $modqueue)) {
do_log('info', 'WARNING unable to read %s directory', $modqueue);
}
- my @qfile = readdir(DIR);
+ my @qfile = sort grep (!/^\./,readdir(DIR));
closedir(DIR);
my ($i,$curlist,$moddelay);
foreach $i (sort @qfile) {
@@ -1239,7 +1239,7 @@
if (!opendir(DIR, $modqueue)) {
do_log('info', 'WARNING unable to read %s directory', $modqueue);
}
- my @qfile = readdir(DIR);
+ my @qfile = sort grep (!/^\./,readdir(DIR));
closedir(DIR);
my ($i,$curlist,$moddelay);
foreach $i (sort @qfile) {
@@ -1631,7 +1631,7 @@
if (!opendir(DIR, $modqueue)) {
do_log('info', 'WARNING unable to read %s directory', $modqueue);
}
- my @qfile = readdir(DIR);
+ my @qfile = sort grep (!/^\./,readdir(DIR));
closedir(DIR);
my ($curlist,$moddelay);
foreach $i (sort @qfile) {
diff -u old/sympa.pl new/sympa.pl
--- old/sympa.pl Sat Oct 16 01:32:15 1999
+++ new/sympa.pl Sat Oct 16 01:55:54 1999
@@ -138,7 +138,7 @@
if (!opendir(DIR, $qdir)) {
fatal_err("Can't open dir %s: %m", $qdir); ## No return.
}
- @qfile = readdir(DIR);
+ @qfile = sort grep (!/^\./,readdir(DIR));
closedir(DIR);

## Scan queuedigest
@@ -646,6 +646,7 @@
}
my @dfile =( sort grep (!/^\./,readdir(DIR)));
closedir(DIR);
+ return unless @dfile;

while ($digest=<@dfile>){
## Load list info....if necessary reload config, subscribers, ....


--- End Message ---


  • [sympa-dev] [address@concealed: Bug#47543: Many 'Incorrect listname' messages], Raphael Hertzog, 10/16/1999

Archive powered by MHonArc 2.6.19+.

Top of Page