From: Howard Chu Date: Sun, 2 Sep 2007 03:43:58 +0000 (+0000) Subject: More for ITS#5117 - only use libfetch for non-file: URLs X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8a532879cd39ffeacf03f9a3cff3e3fa12a34f8b;p=openldap More for ITS#5117 - only use libfetch for non-file: URLs --- diff --git a/libraries/liblutil/fetch.c b/libraries/liblutil/fetch.c index 6535dd20b6..104aa45179 100644 --- a/libraries/liblutil/fetch.c +++ b/libraries/liblutil/fetch.c @@ -43,10 +43,7 @@ ldif_open_url( LDAP_CONST char *urlstr ) { FILE *url; -#ifdef HAVE_FETCH - url = fetchGetURL( (char*) urlstr, "" ); -#else if( strncasecmp( "file:", urlstr, sizeof("file:")-1 ) == 0 ) { char *p; urlstr += sizeof("file:")-1; @@ -66,9 +63,12 @@ ldif_open_url( ber_memfree( p ); } else { - return NULL; - } +#ifdef HAVE_FETCH + url = fetchGetURL( (char*) urlstr, "" ); +#else + url = NULL; #endif + } return url; }