Lines Matching defs:ludp

180 	LDAPURLDesc	*ludp;
196 if (( ludp = (LDAPURLDesc *)calloc( 1, sizeof( LDAPURLDesc )))
201 ludp->lud_port = LDAP_PORT;
205 ldap_free_urldesc( ludp );
215 ludp->lud_scope = LDAP_SCOPE_UNKNOWN;
216 ludp->lud_filter = NULL;
220 ludp->lud_string = url;
223 if (( ludp->lud_dn = strchr( url, '/' )) != NULL ) {
224 *ludp->lud_dn++ = '\0';
231 ludp->lud_port = atoi( p );
235 ludp->lud_host = NULL;
237 ludp->lud_host = url;
238 hex_unescape( ludp->lud_host );
241 if (ludp->lud_dn != NULL){
243 if (( attrs = strchr( ludp->lud_dn, '?' )) != NULL ) {
269 ludp->lud_filter = q;
270 hex_unescape( ludp->lud_filter );
275 ludp->lud_scope = LDAP_SCOPE_ONELEVEL;
277 ludp->lud_scope = LDAP_SCOPE_BASE;
279 ludp->lud_scope = LDAP_SCOPE_SUBTREE;
281 ldap_free_urldesc( ludp );
286 if ( *ludp->lud_dn == '\0' ) {
287 ludp->lud_dn = NULL;
289 hex_unescape( ludp->lud_dn );
302 if (( ludp->lud_attrs = (char **)calloc( nattrs + 1,
304 ldap_free_urldesc( ludp );
309 ludp->lud_attrs[ i ] = p;
313 hex_unescape( ludp->lud_attrs[ i ] );
318 if (errcode = ldap_url_extension_parse(x, &ludp->lud_extensions)){
319 ldap_free_urldesc(ludp);
325 *ludpp = ludp;
341 ldap_free_urldesc( LDAPURLDesc *ludp )
343 if ( ludp != NULLLDAPURLDESC ) {
344 if ( ludp->lud_string != NULL ) {
345 free( ludp->lud_string );
347 if ( ludp->lud_attrs != NULL ) {
348 free( ludp->lud_attrs );
350 if (ludp->lud_extensions != NULL) {
351 ldap_free_urlexts(ludp->lud_extensions);
353 free( ludp );
363 LDAPURLDesc *ludp;
370 if ( ldap_url_parse( url, &ludp ) != 0 ) {
378 if (( ber = ldap_build_search_req( ld, ludp->lud_dn,
379 ludp->lud_scope == LDAP_SCOPE_UNKNOWN ? LDAP_SCOPE_BASE : ludp->lud_scope,
380 ludp->lud_filter ? ludp->lud_filter : "(objectclass=*)",
381 ludp->lud_attrs, attrsonly, NULL, NULL, -1 )) == NULLBER ) {
390 if ( ludp->lud_host != NULL || ludp->lud_port != 0 ) {
392 == NULL || ( srv->lsrv_host = strdup( ludp->lud_host ==
393 NULL ? ld->ld_defhost : ludp->lud_host )) == NULL ) {
400 if ( ludp->lud_port == 0 ) {
403 srv->lsrv_port = ludp->lud_port;
414 ldap_free_urldesc( ludp );