Lines Matching defs:ludp

184 	LDAPURLDesc	*ludp;
201 if (( ludp = (LDAPURLDesc *)NSLDAPI_CALLOC( 1, sizeof( LDAPURLDesc )))
207 ludp->lud_options |= LDAP_URL_OPT_SECURE;
212 ldap_free_urldesc( ludp );
221 ludp->lud_scope = -1;
222 ludp->lud_filter = NULL;
225 ludp->lud_string = urlcopy;
228 if (( ludp->lud_dn = strchr( urlcopy, '/' )) == NULL ) {
230 ldap_free_urldesc( ludp );
235 *ludp->lud_dn++ = '\0';
240 ludp->lud_host = NULL;
242 ludp->lud_host = urlcopy;
243 nsldapi_hex_unescape( ludp->lud_host );
254 if (( p = strrchr( ludp->lud_host, ' ' )) == NULL ) {
255 p = ludp->lud_host;
265 ludp->lud_port = atoi( p );
266 if ( *ludp->lud_host == '\0' ) {
271 ldap_free_urldesc(ludp);
279 if ( ludp->lud_dn != NULL &&
280 ( attrs = strchr( ludp->lud_dn, '?' )) != NULL ) {
297 ludp->lud_filter = p;
303 if (( p = strchr( ludp->lud_filter, '?' ))
308 if ( *ludp->lud_filter == '\0' ) {
309 ludp->lud_filter = NULL;
311 nsldapi_hex_unescape( ludp->lud_filter );
318 ludp->lud_scope = LDAP_SCOPE_ONELEVEL;
320 ludp->lud_scope = LDAP_SCOPE_BASE;
322 ludp->lud_scope = LDAP_SCOPE_SUBTREE;
324 ldap_free_urldesc( ludp );
330 if ( ludp->lud_dn != NULL ) {
331 nsldapi_hex_unescape( ludp->lud_dn );
345 if (( ludp->lud_attrs = (char **)NSLDAPI_CALLOC( nattrs + 1,
347 ldap_free_urldesc( ludp );
352 ludp->lud_attrs[ i ] = p;
356 nsldapi_hex_unescape( ludp->lud_attrs[ i ] );
367 ldap_free_urldesc( ludp );
381 *ludpp = ludp;
389 ldap_free_urldesc( LDAPURLDesc *ludp )
391 if ( ludp != NULLLDAPURLDESC ) {
392 if ( ludp->lud_string != NULL ) {
393 NSLDAPI_FREE( ludp->lud_string );
395 if ( ludp->lud_attrs != NULL ) {
396 NSLDAPI_FREE( ludp->lud_attrs );
398 NSLDAPI_FREE( ludp );
408 LDAPURLDesc *ludp;
417 if ( ldap_url_parse( url, &ludp ) != 0 ) {
426 if ( nsldapi_build_search_req( ld, ludp->lud_dn, ludp->lud_scope,
427 ludp->lud_filter, ludp->lud_attrs, attrsonly, NULL, NULL,
434 if ( ludp->lud_host == NULL ) {
437 host = ludp->lud_host;
449 if ( ludp->lud_port != 0 ) {
451 srv->lsrv_port = ludp->lud_port;
452 } else if ( ludp->lud_host == NULL ) {
455 } else if (( ludp->lud_options & LDAP_URL_OPT_SECURE ) == 0 ) {
464 if (( ludp->lud_options & LDAP_URL_OPT_SECURE ) != 0 ) {
475 ldap_free_urldesc( ludp );