pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/libetpan FIx a bug where the remote IMAP server h...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/662588501f37
branches:  trunk
changeset: 538042:662588501f37
user:      smb <smb%pkgsrc.org@localhost>
date:      Fri Jan 25 18:26:31 2008 +0000

description:
FIx a bug where the remote IMAP server has a AAAA record but there's
no IPv6 connectivity from the client to that site.  Prior to this fix,
the fallback to IPv4 wasn't working properly.  (The fix should be in
the next release of libetpan.)

diffstat:

 mail/libetpan/Makefile         |   4 +-
 mail/libetpan/distinfo         |   3 +-
 mail/libetpan/patches/patch-af |  66 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+), 3 deletions(-)

diffs (96 lines):

diff -r 26431d9d97b2 -r 662588501f37 mail/libetpan/Makefile
--- a/mail/libetpan/Makefile    Fri Jan 25 18:22:45 2008 +0000
+++ b/mail/libetpan/Makefile    Fri Jan 25 18:26:31 2008 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2008/01/18 05:08:26 tnn Exp $
+# $NetBSD: Makefile,v 1.17 2008/01/25 18:26:31 smb Exp $
 #
 
 DISTNAME=              libetpan-0.52
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            mail
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=libetpan/}
 
diff -r 26431d9d97b2 -r 662588501f37 mail/libetpan/distinfo
--- a/mail/libetpan/distinfo    Fri Jan 25 18:22:45 2008 +0000
+++ b/mail/libetpan/distinfo    Fri Jan 25 18:26:31 2008 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.8 2007/10/27 13:55:27 wiz Exp $
+$NetBSD: distinfo,v 1.9 2008/01/25 18:26:32 smb Exp $
 
 SHA1 (libetpan-0.52.tar.gz) = e2fdf76b471e57a153bad4c4def7fde512385021
 RMD160 (libetpan-0.52.tar.gz) = 3e826d57987780b204c9074a9c225e960f214d66
 Size (libetpan-0.52.tar.gz) = 1611405 bytes
 SHA1 (patch-aa) = e783adf544c9a63df584815ee4b033249cecf0ff
+SHA1 (patch-af) = f7f6977a0bdd709eaba1efed216eee6a3a0f542b
diff -r 26431d9d97b2 -r 662588501f37 mail/libetpan/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/libetpan/patches/patch-af    Fri Jan 25 18:26:31 2008 +0000
@@ -0,0 +1,66 @@
+$NetBSD: patch-af,v 1.1 2008/01/25 18:26:32 smb Exp $
+
+--- src/data-types/connect.c.orig      2007-08-06 17:32:30.000000000 -0400
++++ src/data-types/connect.c   2008-01-25 13:15:13.000000000 -0500
+@@ -88,6 +88,21 @@
+   return 0;
+ }
+ 
++#ifdef HAVE_IPV6
++static int verify_sock_errors(int s)
++{
++  uint len;
++  int val;
++  len = sizeof(val);
++  if (getsockopt(s, SOL_SOCKET, SO_ERROR, &val, &len) < 0) {
++    return -1;
++  } else if (val != 0) {
++    return -1;
++  }
++  return 0;
++}
++#endif
++
+ static int wait_connect(int s, int r)
+ {
+   fd_set fds;
+@@ -206,6 +221,7 @@
+ 
+   for (ai = res; ai != NULL; ai = ai->ai_next) {
+     s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
++
+     if (s == -1)
+       continue;
+     
+@@ -239,9 +255,23 @@
+     
+     r = connect(s, ai->ai_addr, ai->ai_addrlen);
+     r = wait_connect(s, r);
++    
++    if (r != -1) {
++      r = verify_sock_errors(s);
++    }
++
+     if (r == -1) {
++      if (ai->ai_next) {
++#ifdef WIN32
++        closesocket(s);
++#else
++        close(s);
++#endif
++        continue;
++      } else {
+       goto close_socket;
+     }
++    }
+     /* if we're here, we're good */
+     break;
+   }
+@@ -252,7 +282,6 @@
+   if (ai == NULL)
+     goto err;
+ #endif
+-  
+   return s;
+   
+  close_socket:



Home | Main Index | Thread Index | Old Index