r2762 - in /packages/libnetxap-perl/trunk: Net/IMAP.pm debian/patches/00list debian/patches/30banner.dpatch debian/patches/40namespace.dpatch

ntyni-guest at users.alioth.debian.org ntyni-guest at users.alioth.debian.org
Sat May 13 17:44:52 UTC 2006


Author: ntyni-guest
Date: Sat May 13 17:44:52 2006
New Revision: 2762

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=2762
Log:
Move the remaining patches to dpatch.

Added:
    packages/libnetxap-perl/trunk/debian/patches/30banner.dpatch   (with props)
    packages/libnetxap-perl/trunk/debian/patches/40namespace.dpatch   (with props)
Modified:
    packages/libnetxap-perl/trunk/Net/IMAP.pm
    packages/libnetxap-perl/trunk/debian/patches/00list

Modified: packages/libnetxap-perl/trunk/Net/IMAP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libnetxap-perl/trunk/Net/IMAP.pm?rev=2762&op=diff
==============================================================================
--- packages/libnetxap-perl/trunk/Net/IMAP.pm (original)
+++ packages/libnetxap-perl/trunk/Net/IMAP.pm Sat May 13 17:44:52 2006
@@ -233,12 +233,6 @@
     return undef;
   }
 
-  unless ($self->has_capability("IMAP4rev1")){
-    carp "server does not support IMAP4rev1";
-    $self->close_connection or carp "error closing connection: $!";
-    return undef;
-  }
-
   return $self;
 }
 
@@ -267,6 +261,14 @@
     $self->{PreAuth}++;
     $self->{State} = IMAP_STATE_AUTH;
   } elsif (($list->[0] ne '*') || ($list->[1] !~ /^ok$/i)) {
+    return undef;
+  }
+  my $supports_imap4rev1 = 0;
+  for my $item (@{$list}) {
+    $supports_imap4rev1++ if ($item =~ /^imap4rev1$/i);
+  }
+  unless ($supports_imap4rev1) {
+    $self->close_connection;
     return undef;
   }
 
@@ -2392,21 +2394,14 @@
   $self->{Parent} = $parent;
 
   my $fields = Net::xAP->parse_fields($str);
-  if (lc($fields->[1]) eq 'nil')
-  {
-    for my $n (0 .. 2) {
-      $self->{Namespaces}{$namespace_types[$n]}{$fields->[0]} = '';
+  for my $n (0 .. 2) {
+    my $field = $fields->[$n];
+    for my $item (@{$field}) {
+      $item->[1] = '' if (lc($item->[1]) eq 'nil');
+      $self->{Namespaces}{$namespace_types[$n]}{$item->[0]} = $item->[1];
     }
   }
-  else
-  {
-    for my $n (0 .. 2) {
-      my $field = $fields->[$n];
-      for my $item (@{$field}) {
-        $self->{Namespaces}{$namespace_types[$n]}{$item->[0]} = $item->[1];
-      }
-    }
-  }
+
   return $self;
 }
 

Modified: packages/libnetxap-perl/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libnetxap-perl/trunk/debian/patches/00list?rev=2762&op=diff
==============================================================================
--- packages/libnetxap-perl/trunk/debian/patches/00list (original)
+++ packages/libnetxap-perl/trunk/debian/patches/00list Sat May 13 17:44:52 2006
@@ -1,3 +1,5 @@
 10shebang.dpatch
 20pod.dpatch
+30banner.dpatch
+40namespace.dpatch
 50debug.dpatch

Added: packages/libnetxap-perl/trunk/debian/patches/30banner.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libnetxap-perl/trunk/debian/patches/30banner.dpatch?rev=2762&op=file
==============================================================================
--- packages/libnetxap-perl/trunk/debian/patches/30banner.dpatch (added)
+++ packages/libnetxap-perl/trunk/debian/patches/30banner.dpatch Sat May 13 17:44:52 2006
@@ -1,0 +1,39 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30banner.dpatch by Niko Tyni <ntyni at iki.fi>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix mishandling of IMAP banner (#256836)
+## DP: Originally by Jaldhar H. Vyas
+
+ at DPATCH@
+diff -urNad trunk~/Net/IMAP.pm trunk/Net/IMAP.pm
+--- trunk~/Net/IMAP.pm	2006-05-13 20:40:28.000000000 +0300
++++ trunk/Net/IMAP.pm	2006-05-13 20:40:48.565229898 +0300
+@@ -233,6 +233,12 @@
+     return undef;
+   }
+ 
++  unless ($self->has_capability("IMAP4rev1")){
++    carp "server does not support IMAP4rev1";
++    $self->close_connection or carp "error closing connection: $!";
++    return undef;
++  }
++
+   return $self;
+ }
+ 
+@@ -263,14 +269,6 @@
+   } elsif (($list->[0] ne '*') || ($list->[1] !~ /^ok$/i)) {
+     return undef;
+   }
+-  my $supports_imap4rev1 = 0;
+-  for my $item (@{$list}) {
+-    $supports_imap4rev1++ if ($item =~ /^imap4rev1$/i);
+-  }
+-  unless ($supports_imap4rev1) {
+-    $self->close_connection;
+-    return undef;
+-  }
+ 
+   $self->{Banner} = $list;
+ 

Propchange: packages/libnetxap-perl/trunk/debian/patches/30banner.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/libnetxap-perl/trunk/debian/patches/40namespace.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libnetxap-perl/trunk/debian/patches/40namespace.dpatch?rev=2762&op=file
==============================================================================
--- packages/libnetxap-perl/trunk/debian/patches/40namespace.dpatch (added)
+++ packages/libnetxap-perl/trunk/debian/patches/40namespace.dpatch Sat May 13 17:44:52 2006
@@ -1,0 +1,39 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 40namespace.dpatch by Niko Tyni <ntyni at iki.fi>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix an issue with the namespace function returning NIL. (#256837)
+## DP: Originally by Jaldhar H. Vyas
+
+ at DPATCH@
+diff -urNad trunk~/Net/IMAP.pm trunk/Net/IMAP.pm
+--- trunk~/Net/IMAP.pm	2006-05-13 20:42:29.000000000 +0300
++++ trunk/Net/IMAP.pm	2006-05-13 20:42:47.601777427 +0300
+@@ -2394,14 +2394,21 @@
+   $self->{Parent} = $parent;
+ 
+   my $fields = Net::xAP->parse_fields($str);
+-  for my $n (0 .. 2) {
+-    my $field = $fields->[$n];
+-    for my $item (@{$field}) {
+-      $item->[1] = '' if (lc($item->[1]) eq 'nil');
+-      $self->{Namespaces}{$namespace_types[$n]}{$item->[0]} = $item->[1];
++  if (lc($fields->[1]) eq 'nil')
++  {
++    for my $n (0 .. 2) {
++      $self->{Namespaces}{$namespace_types[$n]}{$fields->[0]} = '';
++    }
++  }
++  else
++  {
++    for my $n (0 .. 2) {
++      my $field = $fields->[$n];
++      for my $item (@{$field}) {
++        $self->{Namespaces}{$namespace_types[$n]}{$item->[0]} = $item->[1];
++      }
+     }
+   }
+-
+   return $self;
+ }
+ 

Propchange: packages/libnetxap-perl/trunk/debian/patches/40namespace.dpatch
------------------------------------------------------------------------------
    svn:executable = *




More information about the Pkg-perl-cvs-commits mailing list