]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/request.c
fix non-printable flag detection; improve dn test (passes all but last in http:/...
[openldap] / libraries / libldap / request.c
index 576383fb10605959df9de1765a50a084a288293a..b4336b24eb877b2d7d4e9a961404cb0f2307cee8 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /*  Portions
@@ -107,6 +107,18 @@ ldap_send_initial_request(
                servers = NULL;
        }       
 
+#ifdef LDAP_CONNECTIONLESS
+       if (LDAP_IS_UDP(ld)) {
+               if (msgtype == LDAP_REQ_BIND) {
+                       if (ld->ld_options.ldo_cldapdn)
+                               ldap_memfree(ld->ld_options.ldo_cldapdn);
+                       ld->ld_options.ldo_cldapdn = ldap_strdup(dn);
+                       return 0;
+               }
+               if (msgtype != LDAP_REQ_ABANDON && msgtype != LDAP_REQ_SEARCH)
+                       return LDAP_PARAM_ERROR;
+       }
+#endif
        rc = ldap_send_server_request( ld, ber, ld->ld_msgid, NULL,
                                                                        servers, NULL, NULL );
        if (servers)
@@ -556,7 +568,6 @@ ldap_free_request_int( LDAP *ld, LDAPRequest *lr )
 void
 ldap_free_request( LDAP *ld, LDAPRequest *lr )
 {
-       LDAPRequest     *tmplr, *nextlr;
        LDAPRequest     **ttmplr;
 
        Debug( LDAP_DEBUG_TRACE, "ldap_free_request (origid %d, msgid %d)\n",