Remove LDAP_PORT dependencies so that ldap.conf defaults take over.

This commit is contained in:
Kurt Zeilenga 1998-11-30 03:55:49 +00:00
parent 70a4dd7f87
commit ff559f551a
7 changed files with 8 additions and 8 deletions

View file

@ -110,7 +110,7 @@ main( int argc, char **argv )
exit( -1 );
}
if ( (ld = ldap_open( ldaphost, LDAP_PORT )) == NULL ) {
if ( (ld = ldap_open( ldaphost, 0 )) == NULL ) {
perror( "ldap_open" );
exit( -1 );
}

View file

@ -378,7 +378,7 @@ do_queries( int s )
if ( *query == '~' || *query == '@' ) {
ld = NULL;
} else if ( (ld = ldap_open( ldaphost, LDAP_PORT )) == NULL ) {
} else if ( (ld = ldap_open( ldaphost, 0 )) == NULL ) {
fprintf(fp,
"0An error occurred (explanation)\t@%d\t%s\t%d\r\n",
LDAP_SERVER_DOWN, myhost, myport );

View file

@ -355,7 +355,7 @@ connect_to_x500( void )
{
int opt;
if ( (ld = ldap_open( ldaphost, LDAP_PORT )) == NULL ) {
if ( (ld = ldap_open( ldaphost, 0 )) == NULL ) {
syslog( LOG_ALERT, "ldap_open failed" );
return( -1 );
}

View file

@ -262,7 +262,7 @@ process_ldif_rec( char *rbuf )
if ( !use_record && strcasecmp( type, T_REPLICA_STR ) == 0 ) {
++saw_replica;
if (( p = strchr( value, ':' )) == NULL ) {
replicaport = LDAP_PORT;
replicaport = 0;
} else {
*p++ = '\0';
replicaport = atoi( p );

View file

@ -59,7 +59,7 @@ char copyright[] =
static char *server = NULL;
static char *config_file = UD_CONFIG_FILE;
static char *filter_file = FILTERFILE;
static int ldap_port = LDAP_PORT;
static int ldap_port = 0;
static int dereference = TRUE;
char *default_bind_object = NULL;

View file

@ -696,7 +696,7 @@ ldap_chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp )
*ports++ = '\0';
srv->lsrv_port = atoi( ports );
} else {
srv->lsrv_port = LDAP_PORT;
srv->lsrv_port = openldap_ldap_global_options.ldo_defport;
}
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_DNS
} else {
@ -879,7 +879,7 @@ dn2servers( LDAP *ld, char *dn ) /* dn can also be a domain.... */
srvlist = NULL;
for ( i = 0; dxs[ i ] != NULL; ++i ) {
port = LDAP_PORT;
port = openldap_ldap_global_options.ldo_defport;
server_dn = NULL;
if ( strchr( dxs[ i ], ':' ) == NULL ) {
host = dxs[ i ];

View file

@ -272,7 +272,7 @@ ldap_url_search( LDAP *ld, char *url, int attrsonly )
err = -1;
} else {
if ( ludp->lud_port == 0 ) {
srv->lsrv_port = LDAP_PORT;
srv->lsrv_port = openldap_ldap_global_options.ldo_defport;
} else {
srv->lsrv_port = ludp->lud_port;
}