[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amavis-user
Subject:    [AMaViS-user] PATCH - Re: LDAP_OPERATIONS_ERROR if ldap connection drops
From:       Michael Hall <mhall () riverside ! org>
Date:       2005-11-30 18:35:50
Message-ID: 20051130183550.GB20101 () riverside ! org
[Download RAW message or body]

On Wed, Nov 30, 2005 at 12:55:43PM +0100, matteo brancaleoni wrote:

> Hi,
> I think I've found out the bug
> 
> On 11/30/05, matteo brancaleoni <mbrancaleoni@gmail.com> wrote:
> > with latest amavisd-new (amavisd-new-2.3.3) seems that if the ldap
> > connection to the server drops (ie after being idle for sometime)
> > amavisd is not able to reconnect, or to explain it better, it
> > reconnects for for some reasons the query fails.
> > The only way to solve that is to restart amavisd.
> 
> Seems that here's a typo into
> do_search (which leads to be always in error, even if the
> recconection is ok) and a missing return if the retry result
> is available.

You're right, here's the patch as submitted, its slightly different
as the 'else' clause isn't needed:

+++ amavisd     2005-11-30 07:28:32.000000000 -0800
@@ -10603,11 +10603,12 @@
                                         );
         if ($result->code) { die $result->error_name, "\n"; }
       };
-      if (@_ ne '') {
+      if ($@ ne '') {
         my($err) = $@; chomp $err;
         $self->disconnect_from_ldap;
         die "do_search: failed again, $err";
       }
+      return $result;
     }
     die "do_search: $err";
   }

A copy of the patch is also attached.

<snip>

--
Your lucky number is 3552664958674928. Watch for it everywhere.

Mike Hall,
System Admin - Rock Island Communications           <mikeh@rockisland.com>
System Admin - riverside.org, ssdd.org              <mhall@riverside.org>


--- amavisd.orig	2005-11-30 07:26:25.000000000 -0800
+++ amavisd	2005-11-30 07:28:32.000000000 -0800
@@ -10603,11 +10603,12 @@
                                         );
         if ($result->code) { die $result->error_name, "\n"; }
       };
-      if (@_ ne '') {
+      if ($@ ne '') {
         my($err) = $@; chomp $err;
         $self->disconnect_from_ldap;
         die "do_search: failed again, $err";
       }
+      return $result;
     }
     die "do_search: $err";
   }

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic