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

Michael Hanselmann public at hansmi.ch
Wed Jul 22 01:06:42 CEST 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.

Signed-off-by: Michael Hanselmann <public at hansmi.ch>
---
 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 07797f3..cd5bfc8 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.6.0.4




More information about the vlc-devel mailing list