]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/request.c
Add reference to ldap.conf(5).
[openldap] / libraries / libldap / request.c
index f9b724ef8a2b76bea686ab86d5fd14b1cc4160d0..7ea8e32393bba1709127cb912064b9f41e95cedc 100644 (file)
@@ -1,4 +1,8 @@
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -7,10 +11,6 @@
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -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_pvt_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 {
@@ -833,7 +834,7 @@ re_encode_request( LDAP *ld, BerElement *origber, int msgid, char **dnp )
        if ( ldap_debug & LDAP_DEBUG_PACKETS ) {
                Debug( LDAP_DEBUG_ANY, "re_encode_request new request is:\n",
                    0, 0, 0 );
-               ber_dump( ber, 0 );
+               lber_log_dump( LDAP_DEBUG_BER, ldap_debug, ber, 0 );
        }
 #endif /* LDAP_DEBUG */
 
@@ -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 ];