]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/request.c
LDAP C-API changes
[openldap] / libraries / libldap / request.c
index 821a29aa7498e1d4626ef8f608b4283d416f9366..245c73b9486c417b57cb05aa5c1c6c515520cb11 100644 (file)
@@ -442,6 +442,7 @@ void
 ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all )
 {
        LDAPConn        *lc;
+       char            timebuf[32];
 
        fprintf( stderr, "** Connection%s:\n", all ? "s" : "" );
        for ( lc = lconns; lc != NULL; lc = lc->lconn_next ) {
@@ -457,7 +458,7 @@ ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all )
                    "NeedSocket" : ( lc->lconn_status ==
                    LDAP_CONNST_CONNECTING ) ? "Connecting" : "Connected" );
                fprintf( stderr, "  last used: %s\n",
-                   ctime( &lc->lconn_lastused ));
+                   ldap_int_ctime( &lc->lconn_lastused, timebuf ));
                if ( !all ) {
                        break;
                }
@@ -696,7 +697,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 +880,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 ];