Hello all

On upgrading to 0.84 I discovered that the same bug reported ages ago,
has clearly not been rolled into this new release. I fixed it and
attach hereto the patch. I'd suggest a quick bug-fix release :)

Here's the original thread, which reported it for previous revisions.

http://www.mail-archive.com/qpsmtpd@perl.org/msg08090.html

cheers
Dale
--- qpsmtpd-prefork-0.84        2011-01-19 15:01:42.000000000 +0000
+++ qpsmtpd-prefork     2011-01-19 15:06:11.000000000 +0000
@@ -49,7 +49,7 @@
 my $VERSION = "1.0";
 
 # qpsmtpd instances
-my ($qpsmtpd, $qpsmtpd_base);
+my ($qpsmtpd);
 
 # cmd's needed by IPC
 my $ipcrm = '/usr/bin/ipcrm';
@@ -275,16 +275,15 @@
 
     # Hup handler
     $SIG{HUP} = sub {
-        # reload qpmstpd plugins
-       $qpsmtpd = $qpsmtpd_base = qpsmtpd_instance('restart' => 1); # reload 
plugins...
+        # reload qpsmtpd plugins
+       $qpsmtpd = qpsmtpd_instance('restart' => 1); # reload plugins...
         $qpsmtpd->load_plugins;
         kill 'HUP' => keys %children;
         info("reload daemon requested");
     };
 
-    # setup qpsmtpd_instance(s), _base is for resetting to a known state
-    # after each connection
-    $qpsmtpd = $qpsmtpd_base = qpsmtpd_instance();
+    # setup qpsmtpd_instance
+    $qpsmtpd = qpsmtpd_instance();
 
     if ($detach) {
         open STDIN, '/dev/null' or die "/dev/null: $!";
@@ -462,8 +461,8 @@
           "failed to create new object - $!";  # wait here until client 
connects
         info("connect from: " . $client->peerhost . ":" . $client->peerport);
          
-        # clear a previously running instance by cloning the base:
-        $qpsmtpd = $qpsmtpd_base;
+        # clear a previously running instance by creating a new instance
+        $qpsmtpd = qpsmtpd_instance();
 
         # set STDIN/STDOUT and autoflush
         #  ... no longer use POSIX::dup2: it failes after a few 

Reply via email to