All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Magnus Naeslund(k)" <mag@kite.se>
To: mlmmj@mlmmj.org
Subject: Bug in subscriber searching function is_subbed_in()
Date: Mon, 07 Aug 2006 03:49:14 +0000	[thread overview]
Message-ID: <44D6B83A.6030701@kite.se> (raw)

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);

             reply	other threads:[~2006-08-07  3:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-07  3:49 Magnus Naeslund(k) [this message]
2006-08-07  9:44 ` Bug in subscriber searching function is_subbed_in() Mads Martin Joergensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44D6B83A.6030701@kite.se \
    --to=mag@kite.se \
    --cc=mlmmj@mlmmj.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.