[vlc-devel] [PATCH 5/8] raop: Always read headers from wire

Michael Hanselmann public at hansmi.ch
Sat Jan 10 00:46:50 CET 2009


Otherwise they can be mixed up with the next request. Until now, the
connection was always terminated after an error. However, with
authentication, the request can be repeated with authentication
information.
---
 modules/stream_out/raop.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/stream_out/raop.c b/modules/stream_out/raop.c
index 54e3968..b5e7bfd 100644
--- a/modules/stream_out/raop.c
+++ b/modules/stream_out/raop.c
@@ -873,14 +873,6 @@ static int ExecRequest( vlc_object_t *p_this, const char *psz_method,
         goto error;
     }
 
-    if ( i_status != 200 )
-    {
-        msg_Err( p_this, "Request failed (%s), status is %d",
-                 p_sys->psz_last_status_line, i_status );
-        i_err = VLC_EGENERIC;
-        goto error;
-    }
-
     if ( p_resp_headers )
         vlc_dictionary_clear( p_resp_headers, FreeHeader, NULL );
 
@@ -893,6 +885,14 @@ static int ExecRequest( vlc_object_t *p_this, const char *psz_method,
             goto error;
     }
 
+    if ( i_status != 200 )
+    {
+        msg_Err( p_this, "Request failed (%s), status is %d",
+                 p_sys->psz_last_status_line, i_status );
+        i_err = VLC_EGENERIC;
+        goto error;
+    }
+
 error:
     FREENULL( p_sys->psz_last_status_line );
 
-- 
1.5.6.3




More information about the vlc-devel mailing list