tags 600054 + patch
tags 600054 + pending
thanks

Dear maintainer,

I've prepared an NMU for ddclient (versioned as 3.8.0-11.4) and
uploaded it to DELAYED/10. Please feel free to tell me if I
should delay it longer.

Regards.
diff -Nru ddclient-3.8.0/debian/changelog ddclient-3.8.0/debian/changelog
--- ddclient-3.8.0/debian/changelog	2011-01-11 21:25:23.000000000 +0200
+++ ddclient-3.8.0/debian/changelog	2012-01-04 17:34:30.000000000 +0200
@@ -1,3 +1,10 @@
+ddclient (3.8.0-11.4) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Prevent hang if IP address check blocks. Closes: #600054
+
+ -- Stefano Rivera <stefa...@debian.org>  Wed, 04 Jan 2012 17:33:35 +0200
+
 ddclient (3.8.0-11.3) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru ddclient-3.8.0/debian/patches/checkip-hang.diff ddclient-3.8.0/debian/patches/checkip-hang.diff
--- ddclient-3.8.0/debian/patches/checkip-hang.diff	1970-01-01 02:00:00.000000000 +0200
+++ ddclient-3.8.0/debian/patches/checkip-hang.diff	2012-01-04 17:33:21.000000000 +0200
@@ -0,0 +1,75 @@
+Description: Prevent hang if the IP address check blocks
+ ddclient may hang if the read operation on the connection to get the ip (in
+ sub geturl) 'blocks'.
+Author: Panos
+Origin: http://sourceforge.net/tracker/?func=detail&atid=676130&aid=2880462&group_id=116817
+Bug-Debian: http://bugs.debian.org/600054
+Applied-Upstream: http://sourceforge.net/apps/trac/ddclient/changeset/114/trunk
+Last-Update: 2012-01-04
+
+--- a/ddclient
++++ b/ddclient
+@@ -1808,36 +1808,36 @@
+     }
+ 
+     if (defined $sd) {
+-	## send the request to the http server
+-	verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP');
+-	verbose("SENDING:", $request);
++		## send the request to the http server
++		verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP');
++		verbose("SENDING:", $request);
+ 
+     	$0 = sprintf("%s - sending to %s port %s", $program, $peer, $port);
+-	my $result = syswrite $sd, $rq;
+-	if ($result != length($rq)) {
+-	    warning("cannot send to $peer:$port ($!).");
+-	    
+-	} else {
+-	    my $timeout = 0;
+-	    local $SIG{'ALRM'} = sub { $timeout = 1; };
++		my $result = syswrite $sd, $rq;
++		if ($result != length($rq)) {
++	    	warning("cannot send to $peer:$port ($!).");
++		} else {
++			$0 = sprintf("%s - reading from %s port %s", $program, $peer, $port);
++			eval {
++				local $SIG{'ALRM'} = sub { die "timeout";};
++	    		alarm(opt('timeout')) if opt('timeout') > 0;
++				while ($_ = <$sd>) {
++    	        	$0 = sprintf("%s - read from %s port %s", $program, $peer, $port);
++					verbose("RECEIVE:", "%s", define($_, "<undefined>"));
++					$reply .= $_ if defined $_;
++	    		}
++		    	if (opt('timeout') > 0) {
++					alarm(0);
++	    		}
++			};
++			close($sd);
+ 
+-    	    $0 = sprintf("%s - reading from %s port %s", $program, $peer, $port);
+-	    alarm(opt('timeout')) if opt('timeout') > 0;
+-	    while (!$timeout &&  ($_ = <$sd>)) {
+-    	        $0 = sprintf("%s - read from %s port %s", $program, $peer, $port);
+-		verbose("RECEIVE:", "%s", define($_, "<undefined>"));
+-		$reply .= $_ if defined $_;
+-	    }
+-	    if (opt('timeout') > 0) {
+-		alarm(0);
+-	    }
+-	    close($sd);
+-	    if ($timeout) {
+-		warning("TIMEOUT: %s after %s seconds", $to, opt('timeout'));
+-		$reply = '';
+-	    }
+-	    $reply = '' if !defined $reply;
+-	}
++			if ($@ and $@ =~ /timeout/) {
++				warning("TIMEOUT: %s after %s seconds", $to, opt('timeout'));
++				$reply = '';
++	    	}
++	    		$reply = '' if !defined $reply;
++		}
+     }
+     $0 = sprintf("%s - closed %s port %s", $program, $peer, $port);
+ 
diff -Nru ddclient-3.8.0/debian/patches/series ddclient-3.8.0/debian/patches/series
--- ddclient-3.8.0/debian/patches/series	2010-03-28 18:51:15.000000000 +0200
+++ ddclient-3.8.0/debian/patches/series	2012-01-04 17:30:07.000000000 +0200
@@ -5,3 +5,4 @@
 bug468320_minmax_logic.diff
 upstream_change_110.diff 
 prevent_cache_leak.diff
+checkip-hang.diff

Reply via email to