Commit 64964519 authored by Michael Hanselmann's avatar Michael Hanselmann Committed by Rémi Denis-Courmont

raop: Add loop for request retry

This loop will be used by authentication.
Signed-off-by: default avatarMichael Hanselmann <public@hansmi.ch>
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent be1e8e59
...@@ -793,6 +793,8 @@ static int ExecRequest( vlc_object_t *p_this, const char *psz_method, ...@@ -793,6 +793,8 @@ static int ExecRequest( vlc_object_t *p_this, const char *psz_method,
goto error; goto error;
} }
while ( 1 )
{
/* Send request */ /* Send request */
i_err = SendRequest( p_this, psz_method, psz_content_type, psz_body, i_err = SendRequest( p_this, psz_method, psz_content_type, psz_body,
p_req_headers); p_req_headers);
...@@ -818,13 +820,17 @@ static int ExecRequest( vlc_object_t *p_this, const char *psz_method, ...@@ -818,13 +820,17 @@ static int ExecRequest( vlc_object_t *p_this, const char *psz_method,
goto error; goto error;
} }
if ( i_status != 200 ) if ( i_status == 200 )
/* Request successful */
break;
else
{ {
msg_Err( p_this, "Request failed (%s), status is %d", msg_Err( p_this, "Request failed (%s), status is %d",
p_sys->psz_last_status_line, i_status ); p_sys->psz_last_status_line, i_status );
i_err = VLC_EGENERIC; i_err = VLC_EGENERIC;
goto error; goto error;
} }
}
error: error:
FREENULL( p_sys->psz_last_status_line ); FREENULL( p_sys->psz_last_status_line );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment