]> git.sesse.net Git - vlc/commitdiff
raop: Always read headers from wire
authorMichael Hanselmann <public@hansmi.ch>
Tue, 21 Jul 2009 23:06:42 +0000 (01:06 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 29 Jul 2009 16:17:38 +0000 (19:17 +0300)
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@hansmi.ch>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
modules/stream_out/raop.c

index 96579eea6b77d0bea2029b59ac46576ba37e8ae4..24771b96d4324bfb16a75abcbc942823e24348dc 100644 (file)
@@ -810,14 +810,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 );
 
@@ -830,6 +822,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 );