Lines Matching defs:ld
405 ldap_url_search( LDAP *ld, const char *url, int attrsonly )
413 if ( !NSLDAPI_VALID_LDAP_POINTER( ld )) {
418 LDAP_SET_LDERRNO( ld, LDAP_PARAM_ERROR, NULL, NULL );
422 LDAP_MUTEX_LOCK( ld, LDAP_MSGID_LOCK );
423 msgid = ++ld->ld_msgid;
424 LDAP_MUTEX_UNLOCK( ld, LDAP_MSGID_LOCK );
426 if ( nsldapi_build_search_req( ld, ludp->lud_dn, ludp->lud_scope,
435 host = ld->ld_defhost;
446 LDAP_SET_LDERRNO( ld, LDAP_NO_MEMORY, NULL, NULL );
453 /* URL has no port or host - use port from ld */
454 srv->lsrv_port = ld->ld_defport;
471 err = nsldapi_send_server_request( ld, ber, msgid, NULL, srv,
482 ldap_url_search_st( LDAP *ld, const char *url, int attrsonly,
492 if ( ld != NULL ) {
493 LDAP_SET_LDERRNO( ld, LDAP_PARAM_ERROR, NULL, NULL );
501 if (( msgid = ldap_url_search( ld, url, attrsonly )) == -1 ) {
502 return( LDAP_GET_LDERRNO( ld, NULL, NULL ) );
505 if ( ldap_result( ld, msgid, 1, timeout, res ) == -1 ) {
506 return( LDAP_GET_LDERRNO( ld, NULL, NULL ) );
509 if ( LDAP_GET_LDERRNO( ld, NULL, NULL ) == LDAP_TIMEOUT ) {
510 (void) ldap_abandon( ld, msgid );
511 LDAP_SET_LDERRNO( ld, LDAP_TIMEOUT, NULL, NULL );
515 return( ldap_result2error( ld, *res, 0 ));
521 ldap_url_search_s( LDAP *ld, const char *url, int attrsonly, LDAPMessage **res )
525 if (( msgid = ldap_url_search( ld, url, attrsonly )) == -1 ) {
526 return( LDAP_GET_LDERRNO( ld, NULL, NULL ) );
529 if ( ldap_result( ld, msgid, 1, (struct timeval *)NULL, res ) == -1 ) {
530 return( LDAP_GET_LDERRNO( ld, NULL, NULL ) );
533 return( ldap_result2error( ld, *res, 0 ));
565 LDAP *ld,
589 if ((ld == NULL) || ((dn = ldap_dns_to_dn(dns_name, &nameparts)) ==
593 if ((url = ldap_dn_to_url(ld, dn, nameparts)) == NULL) {
798 LDAP *ld,
816 if (ldap_search_s(ld, dn, LDAP_SCOPE_BASE,
820 if ((e = ldap_first_entry(ld, res)) != NULL) {
824 ldap_get_values(ld, e, "labeledURI")) !=