From: Kurt Zeilenga Date: Mon, 2 Aug 1999 07:41:29 +0000 (+0000) Subject: Fix --enable-dns compilation problems. X-Git-Tag: TWEB_OL_BASE~326 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=236be7f5a7c5028c3d9b3c91a8a873108578ad33;p=openldap Fix --enable-dns compilation problems. --- diff --git a/libraries/libldap/getdxbyname.c b/libraries/libldap/getdxbyname.c index ec6a959ced..4543e88e45 100644 --- a/libraries/libldap/getdxbyname.c +++ b/libraries/libldap/getdxbyname.c @@ -33,7 +33,7 @@ static char ** decode_answer LDAP_P(( unsigned char *answer, ber_len_t len )); * array. */ char ** -ldap_getdxbyname( char *domain ) +ldap_getdxbyname( const char *domain ) { unsigned char buf[ PACKETSZ ]; char **dxs; @@ -64,7 +64,7 @@ ldap_getdxbyname( char *domain ) static char ** -decode_answer( unsigned char *answer, int len ) +decode_answer( unsigned char *answer, ber_len_t len ) { HEADER *hp; char buf[ 256 ], **dxs; diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index da17e273bf..ba5648703b 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -29,7 +29,7 @@ static void use_connection LDAP_P(( LDAP *ld, LDAPConn *lc )); static void free_servers LDAP_P(( LDAPServer *srvlist )); #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_DNS -static LDAPServer *dn2servers LDAP_P(( LDAP *ld, char *dn )); +static LDAPServer *dn2servers LDAP_P(( LDAP *ld, const char *dn )); #endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_DNS */ static BerElement *re_encode_request LDAP_P(( @@ -114,7 +114,7 @@ ldap_send_initial_request( #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_DNS - if ( LDAP_BOOL_GET(&ld->ld_options, LDAP_BOOL_DNS )) + if ( LDAP_BOOL_GET(&ld->ld_options, LDAP_BOOL_DNS ) && ldap_is_dns_dn( dn ) ) { if (( servers = dn2servers( ld, dn )) == NULL ) { @@ -885,9 +885,10 @@ ldap_find_request_by_msgid( LDAP *ld, ber_int_t msgid ) #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_DNS static LDAPServer * -dn2servers( LDAP *ld, char *dn ) /* dn can also be a domain.... */ +dn2servers( LDAP *ld, const char *dn ) /* dn can also be a domain.... */ { - char *p, *domain, *host, *server_dn, **dxs; + char *p, *host, *server_dn, **dxs; + const char *domain; int i, port; LDAPServer *srvlist, *prevsrv, *srv; @@ -905,7 +906,7 @@ dn2servers( LDAP *ld, char *dn ) /* dn can also be a domain.... */ srvlist = NULL; for ( i = 0; dxs[ i ] != NULL; ++i ) { - port = openldap_ldap_global_options.ldo_defport; + port = ldap_int_global_options.ldo_defport; server_dn = NULL; if ( strchr( dxs[ i ], ':' ) == NULL ) { host = dxs[ i ];