]> git.sesse.net Git - vlc/blobdiff - modules/access/http.c
"#if HAVE_FOO" -> "#ifdef HAVE_FOO"
[vlc] / modules / access / http.c
index 8030e658fdcae37b8376a9213021c2587ad7c6c8..d0a53d7a84af85189bd0e10fa55745a2ef97a1db 100644 (file)
@@ -449,7 +449,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
                           "in registry." );
         }
     }
-#elif HAVE_GETENV
+#elif defined( HAVE_GETENV )
     else
     {
         psz = getenv( "http_proxy" );
@@ -481,8 +481,9 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
         }
     }
 
-    msg_Dbg( p_access, "http: server='%s' port=%d file='%s",
-             p_sys->url.psz_host, p_sys->url.i_port, p_sys->url.psz_path );
+    msg_Dbg( p_access, "http: server='%s' port=%d file='%s'",
+             p_sys->url.psz_host, p_sys->url.i_port,
+             p_sys->url.psz_path != NULL ? p_sys->url.psz_path : "" );
     if( p_sys->b_proxy )
     {
         msg_Dbg( p_access, "      proxy %s:%d", p_sys->proxy.psz_host,
@@ -872,6 +873,8 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
                 p_sys->b_reconnect = false;
                 i_read = Read( p_access, p_buffer, i_len );
                 p_sys->b_reconnect = true;
+
+                return i_read;
             }
         }