]> git.sur5r.net Git - openldap/commitdiff
More for ITS#5117 - only use libfetch for non-file: URLs
authorHoward Chu <hyc@openldap.org>
Sun, 2 Sep 2007 03:43:58 +0000 (03:43 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 2 Sep 2007 03:43:58 +0000 (03:43 +0000)
libraries/liblutil/fetch.c

index 6535dd20b6ec6b4cb358ce8097779d5dcce4c04c..104aa45179678ab031b5467ce31be58a948e81b5 100644 (file)
@@ -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;
 }