public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-libs/cyrus-sasl/files: cyrus-sasl-2.1.25-get_fqhostname.patch
@ 2012-02-21 11:56 Eray Aslan (eras)
  0 siblings, 0 replies; only message in thread
From: Eray Aslan (eras) @ 2012-02-21 11:56 UTC (permalink / raw
  To: gentoo-commits

eras        12/02/21 11:56:50

  Added:                cyrus-sasl-2.1.25-get_fqhostname.patch
  Log:
  Fix failing get_fqhostname() - bug #405097
  
  (Portage version: 2.1.10.48/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-get_fqhostname.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-get_fqhostname.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.25-get_fqhostname.patch?rev=1.1&content-type=text/plain

Index: cyrus-sasl-2.1.25-get_fqhostname.patch
===================================================================
https://bugzilla.cyrusimap.org/show_bug.cgi?id=3589
Gentoo bug #405097
--- cyrus-sasl-2.1.25/lib/saslutil.c.orig	2011-10-21 13:59:59.354462366 +0200
+++ cyrus-sasl-2.1.25/lib/saslutil.c	2011-10-21 14:10:55.849675881 +0200
@@ -555,32 +555,44 @@
 		  NULL,		/* don't care abour service/port */
 		  &hints,
 		  &result) != 0) {
-	/* errno on Unix, WSASetLastError on Windows are already done by the function */
-	return (-1);
+        if (abort_if_no_fqdn) {
+	    /* errno on Unix, WSASetLastError on Windows are already done by the function */
+	    return (-1);
+	} else {
+	    goto LOWERCASE;
+	}
     }
 
-    if (abort_if_no_fqdn && (result == NULL || result->ai_canonname == NULL)) {
+    if (result == NULL || result->ai_canonname == NULL) {
 	freeaddrinfo (result);
+        if (abort_if_no_fqdn) {
 #ifdef WIN32
-	WSASetLastError (WSANO_DATA);
+	    WSASetLastError (WSANO_DATA);
 #elif defined(ENODATA)
-	errno = ENODATA;
+	    errno = ENODATA;
 #elif defined(EADDRNOTAVAIL)
-	errno = EADDRNOTAVAIL;
+	    errno = EADDRNOTAVAIL;
 #endif
-	return (-1);
+	    return (-1);
+	} else {
+	    goto LOWERCASE;
+	}
     }
 
-    if (abort_if_no_fqdn && strchr (result->ai_canonname, '.') == NULL) {
+    if (strchr (result->ai_canonname, '.') == NULL) {
 	freeaddrinfo (result);
+        if (abort_if_no_fqdn) {
 #ifdef WIN32
-	WSASetLastError (WSANO_DATA);
+	    WSASetLastError (WSANO_DATA);
 #elif defined(ENODATA)
-	errno = ENODATA;
+	    errno = ENODATA;
 #elif defined(EADDRNOTAVAIL)
-	errno = EADDRNOTAVAIL;
+	    errno = EADDRNOTAVAIL;
 #endif
-	return (-1);
+	    return (-1);
+	} else {
+	    goto LOWERCASE;
+	}
     }
 
 






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-21 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-21 11:56 [gentoo-commits] gentoo-x86 commit in dev-libs/cyrus-sasl/files: cyrus-sasl-2.1.25-get_fqhostname.patch Eray Aslan (eras)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox