From: Kurt Zeilenga Date: Tue, 19 Oct 2004 03:07:05 +0000 (+0000) Subject: ITS#3168: Add LDAP_OPT_SOCKBUF X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~412 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=440e631319dcec0f9d3432ccf5b4ab4a1652fa90;p=openldap ITS#3168: Add LDAP_OPT_SOCKBUF --- diff --git a/include/ldap.h b/include/ldap.h index 4949f54658..99ed1fc011 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -119,6 +119,7 @@ LDAP_BEGIN_DECL #define LDAP_OPT_NETWORK_TIMEOUT 0x5005 /* socket level timeout */ #define LDAP_OPT_URI 0x5006 #define LDAP_OPT_REFERRAL_URLS 0x5007 /* Referral URLs */ +#define LDAP_OPT_SOCKBUF 0x5008 /* sockbuf */ /* OpenLDAP TLS options */ #define LDAP_OPT_X_TLS 0x6000 diff --git a/libraries/libldap/options.c b/libraries/libldap/options.c index f191cb8161..debbc5b4fe 100644 --- a/libraries/libldap/options.c +++ b/libraries/libldap/options.c @@ -165,6 +165,11 @@ ldap_get_option( ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, outvalue ); return LDAP_OPT_SUCCESS; + case LDAP_OPT_SOCKBUF: + if( ld == NULL ) break; + outvalue = ld->ld_sb; + return LDAP_OPT_SUCCESS; + case LDAP_OPT_TIMEOUT: /* the caller has to free outvalue ! */ if ( ldap_int_timeval_dup( outvalue, lo->ldo_tm_api) != 0 ) {