#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
}
/* make working copy of the remainder of the URL */
- if (( url = strdup( url )) == NULL ) {
+ if (( url = ldap_strdup( url )) == NULL ) {
ldap_free_urldesc( ludp );
return( LDAP_URL_ERR_MEM );
}
if ( ludp->lud_host != NULL || ludp->lud_port != 0 ) {
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
if (( srv = (LDAPServer *)calloc( 1, sizeof( LDAPServer )))
- == NULL || ( srv->lsrv_host = strdup( ludp->lud_host ==
+ == NULL || ( srv->lsrv_host = ldap_strdup( ludp->lud_host ==
NULL ? ld->ld_defhost : ludp->lud_host )) == NULL ) {
if ( srv != NULL ) {
free( srv );
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;
}