[Pkg-openldap-devel] [openldap] 02/05: r2651 at pulsar: torsten | 2005-09-19 17:08:05 +0200 * Fix duplicate timeout setting using the patch by Ondrej Sury (closes: #329076). Thanks, Ondrej!

Timo Aaltonen tjaalton-guest at alioth.debian.org
Thu Oct 10 05:33:54 UTC 2013


This is an automated email from the git hooks/post-receive script.

tjaalton-guest pushed a commit to annotated tag 2.1.30-12
in repository openldap.

commit b7332b53a206f9073067b32d2b8d46b475308065
Author: Torsten Landschoff <torsten at debian.org>
Date:   Mon Sep 19 15:06:18 2005 +0000

     r2651 at pulsar:  torsten | 2005-09-19 17:08:05 +0200
      * Fix duplicate timeout setting using the patch by Ondrej Sury
        (closes: #329076). Thanks, Ondrej!
---
 debian/changelog         |    5 +++--
 debian/control           |    2 +-
 libraries/libldap/open.c |   44 ++++++++++++++++++++++++++++++--------------
 3 files changed, 34 insertions(+), 17 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d6b4177..cff61e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,10 @@
 openldap2 (2.1.30-12) unstable; urgency=low
 
   * [l10n] Vietnamese translations by Clytie Siddall (closes: #316603).
-  * debian/control: Build depend on libgnutls-dev >= 1.2 (closes: #322089).
+  * Fix duplicate timeout setting using the patch by Ondrej Sury 
+    (closes: #329076). Thanks, Ondrej!
 
- --
+ -- Torsten Landschoff <torsten at debian.org>  Mon, 19 Sep 2005 15:05:23 +0200
 
 openldap2 (2.1.30-11) unstable; urgency=high
 
diff --git a/debian/control b/debian/control
index 3bd3824..191abe3 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: net
 Priority: optional
 Maintainer: Torsten Landschoff <torsten at debian.org>
 Uploaders: Roland Bauerschmidt <rb at debian.org>, Stephen Frost <sfrost at debian.org>, Steve Langasek <vorlon at debian.org>
-Build-Depends: libdb4.2-dev, libwrap0-dev, libiodbc2-dev, libsasl2-dev (>= 2.1.3-1), dpkg-dev (>= 1.7.1), libncurses5-dev, autoconf2.13, debconf-utils, libgnutls-dev (>= 1.2), libgcrypt11-dev, debhelper (>= 4.1.16), libltdl3-dev (>= 1.4.3), libslp-dev, po-debconf
+Build-Depends: libdb4.2-dev, libwrap0-dev, libiodbc2-dev, libsasl2-dev (>= 2.1.3-1), dpkg-dev (>= 1.7.1), libncurses5-dev, autoconf2.13, debconf-utils, libgnutls11-dev, libgcrypt11-dev, debhelper (>= 4.1.16), libltdl3-dev (>= 1.4.3), libslp-dev, po-debconf
 Build-Conflicts: libbind-dev, bind-dev
 Standards-Version: 3.6.1
 
diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c
index 3d8fa23..36c5aa5 100644
--- a/libraries/libldap/open.c
+++ b/libraries/libldap/open.c
@@ -126,6 +126,9 @@ ldap_create( LDAP **ldp )
 	/* but not pointers to malloc'ed items */
 	ld->ld_options.ldo_sctrls = NULL;
 	ld->ld_options.ldo_cctrls = NULL;
+	ld->ld_options.ldo_tm_api = NULL;
+	ld->ld_options.ldo_tm_net = NULL;
+	ld->ld_options.ldo_defludp = NULL;
 
 #ifdef HAVE_CYRUS_SASL
 	ld->ld_options.ldo_def_sasl_mech = gopts->ldo_def_sasl_mech
@@ -138,30 +141,43 @@ ldap_create( LDAP **ldp )
 		? LDAP_STRDUP( gopts->ldo_def_sasl_authzid ) : NULL;
 #endif
 
-	ld->ld_options.ldo_defludp = ldap_url_duplist(gopts->ldo_defludp);
+	if ( gopts->ldo_tm_api &&
+		ldap_int_timeval_dup( &ld->ld_options.ldo_tm_api, gopts->ldo_tm_api ))
+		goto nomem;
 
-	if ( ld->ld_options.ldo_defludp == NULL ) {
-		LDAP_FREE( (char*)ld );
-		return LDAP_NO_MEMORY;
-	}
+	if ( gopts->ldo_tm_net &&
+		ldap_int_timeval_dup( &ld->ld_options.ldo_tm_net, gopts->ldo_tm_net ))
+		goto nomem;
 
-	if (( ld->ld_selectinfo = ldap_new_select_info()) == NULL ) {
-		ldap_free_urllist( ld->ld_options.ldo_defludp );
-		LDAP_FREE( (char*) ld );
-		return LDAP_NO_MEMORY;
+	if ( gopts->ldo_defludp ) {
+		ld->ld_options.ldo_defludp = ldap_url_duplist(gopts->ldo_defludp);
+
+		if ( ld->ld_options.ldo_defludp == NULL ) goto nomem;
 	}
 
+	if (( ld->ld_selectinfo = ldap_new_select_info()) == NULL ) goto nomem;
+
 	ld->ld_lberoptions = LBER_USE_DER;
 
 	ld->ld_sb = ber_sockbuf_alloc( );
-	if ( ld->ld_sb == NULL ) {
-		ldap_free_urllist( ld->ld_options.ldo_defludp );
-		LDAP_FREE( (char*) ld );
-		return LDAP_NO_MEMORY;
-	}
+	if ( ld->ld_sb == NULL ) goto nomem;
 
 	*ldp = ld;
 	return LDAP_SUCCESS;
+
+nomem:
+	ldap_free_select_info( ld->ld_selectinfo );
+	ldap_free_urllist( ld->ld_options.ldo_defludp );
+	LDAP_FREE( ld->ld_options.ldo_tm_net );
+	LDAP_FREE( ld->ld_options.ldo_tm_api );
+#ifdef HAVE_CYRUS_SASL
+	LDAP_FREE( ld->ld_options.ldo_def_sasl_authzid );
+	LDAP_FREE( ld->ld_options.ldo_def_sasl_authcid );
+	LDAP_FREE( ld->ld_options.ldo_def_sasl_realm );
+	LDAP_FREE( ld->ld_options.ldo_def_sasl_mech );
+#endif
+	LDAP_FREE( (char *)ld );
+	return LDAP_NO_MEMORY;
 }
 
 /*

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openldap/openldap.git



More information about the Pkg-openldap-devel mailing list