[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [imapsync] patch for 1.267: must log errors when disconnected


From Gilles LAMIRAL <gilles dot lamiral at laposte dot net>
Subject Re: [imapsync] patch for 1.267: must log errors when disconnected
Date Sat, 14 Feb 2009 17:47:58 +0100

Hello Phil,

> Here's a patch for this bug that I reported a long time ago.  
> This is short and simple enough that hopefully it will get included.
> This patch addresses numerous cases where imapsync might not report 
> an error even if all folder were NOT successfully sync'd because 
> of a dropped network connection.

Applied. 
(Already said since patchpatch)

Sorry for the delay.

> --- imapsync.ORIG       2009-01-31 16:03:52.066125000 -0500
> +++ imapsync    2009-01-31 16:04:42.159875000 -0500
> @@ -1625,7 +1625,19 @@
>  print "Time : ", timenext(), " s\n";
>  }
> 
> -
> +# FOLDER loop is exited any time a connection is lost be sure to log it!
> +if ( $from->IsUnconnected() or $to->IsUnconnected() ) {
> +       my @err;
> +       if ( $from->IsUnconnected() ) {
> +               $error++;
> +               push( @err, "(from) host1[$host1]" );
> +       }
> +       if ( $to->IsUnconnected() ) {
> +               $error++;
> +               push( @err, "(to) host2[$host2]" );
> +       }
> +       warn("error: lost connection(s): @err\n");
> +}
> 
>  $from->logout();
>  $to->logout();

-- 
Au revoir,                               02 99 64 31 77
Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06