]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/url.c
Cast char* argument to hh_to_c() to Byte*
[openldap] / libraries / libldap / url.c
index b97139a12d6d399ac8c450dd0281e88795250463..d7af4a9c43f11e0a7391c62c5f8c6767fe135f5f 100644 (file)
@@ -1,4 +1,8 @@
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1996 Regents of the University of Michigan.
  *  All rights reserved.
  *
 
 #include "portable.h"
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -34,9 +34,10 @@ static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of
 #include "ldap-int.h"
 
 
+/* local functions */
 static int skip_url_prefix LDAP_P(( char **urlp, int *enclosedp ));
 static void hex_unescape LDAP_P(( char *s ));
-static int unhex LDAP_P(( char c ));
+static int unhex( char c );
 
 
 int
@@ -271,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;
                        }