]> git.sur5r.net Git - openldap/commitdiff
Initialize openldap_ldap_global_options struct (not yet used).
authorKurt Zeilenga <kurt@openldap.org>
Mon, 9 Nov 1998 23:02:27 +0000 (23:02 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 9 Nov 1998 23:02:27 +0000 (23:02 +0000)
libraries/libldap/init.c
libraries/libldap/ldap-int.h

index f457511493ee7ee7ebb9aee533b1b77c3cd53aa9..3c8771f6f357a521467575efc4892006370922f8 100644 (file)
@@ -9,7 +9,10 @@
 
 #include "ldap-int.h"
 
-struct ldapoptions openldap_ldap_global_options;
+struct ldapoptions openldap_ldap_global_options; 
+
+#undef gopts
+#define gopts openldap_ldap_global_options
 
 int    openldap_ldap_initialized = 0;
 
@@ -19,5 +22,20 @@ void openldap_ldap_initialize( void )
                return;
        }
 
+       gopts.ldo_version =     LDAP_VERSION2;
+       gopts.ldo_deref =       LDAP_DEREF_NEVER;
+       gopts.ldo_timelimit = LDAP_NO_LIMIT;
+       gopts.ldo_sizelimit = LDAP_NO_LIMIT;
+
+       gopts.ldo_defhost = strdup("localhost");
+       gopts.ldo_defport = LDAP_PORT;
+
+       LDAP_BOOL_ZERO(&gopts);
+
+#if defined( LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS ) || \
+       LDAP_VERSION_MAX > LDAP_VERSION2
+       LDAP_BOOL_SET(&gopts, LDAP_BOOL_REFERRALS);
+#endif
+
        openldap_ldap_initialized = 1;
 }
index 166ecd5563a6ac899464b1f6c1f529f38f47ba15..97e62695924b78a820267d2620cb15d9627c6d0c 100644 (file)
@@ -67,6 +67,9 @@ struct ldapoptions {
        int             ldo_timelimit;
        int             ldo_sizelimit;
 
+       char*   ldo_defhost;
+       int             ldo_defport;
+
        int             ldo_cldaptries; /* connectionless search retry count */
        int             ldo_cldaptimeout;/* time between retries */
        int             ldo_refhoplimit;        /* limit on referral nesting */
@@ -93,6 +96,8 @@ struct ldap {
 
        int             ld_version;             /* version connected at */
        char    *ld_host;
+       int             ld_port;
+
        char    ld_lberoptions;
 
        LDAPFiltDesc    *ld_filtd;      /* from getfilter for ufn searches */