All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug in subscriber searching function is_subbed_in()
@ 2006-08-07  3:49 Magnus Naeslund(k)
  2006-08-07  9:44 ` Mads Martin Joergensen
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Naeslund(k) @ 2006-08-07  3:49 UTC (permalink / raw)
  To: mlmmj

I found out that the subscribercode searches the subscriber directory 
and tries to mmap the lockfile it created earlier which size is zero,
hence the logentry:

/usr/bin/mlmmj-sub[25209]: subscriberfuncs.c:61: Could not mmap fd: Invalid argument

I modified the code to skip ALL files that starts with a dot, that
takes care if . and .. directories aswell as the .$file.lock files.

Is this patch acceptable?

Regards,
Magnus


--- mlmmj-1.2.11-vanilla/src/subscriberfuncs.c  2005-02-14 23:59:24.000000000 +0100
+++ mlmmj-1.2.11/src/subscriberfuncs.c  2006-08-07 05:42:49.000000000 +0200
@@ -101,9 +101,8 @@
        }

        while((dp = readdir(subddir)) != NULL) {
-               if(!strcmp(dp->d_name, "."))
-                       continue;
-               if(!strcmp(dp->d_name, ".."))
+                /* Skip "." ".." and ".*.lock" files */
+               if(dp->d_name[0] = '.')
                        continue;

                subreadname = concatstr(2, subddirname, dp->d_name);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-07  9:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-07  3:49 Bug in subscriber searching function is_subbed_in() Magnus Naeslund(k)
2006-08-07  9:44 ` Mads Martin Joergensen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.