Commit 8bd86352 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix error code when server is overloaded

parent e2afd14a
...@@ -701,7 +701,7 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl, ...@@ -701,7 +701,7 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
if( ( p_vod->p_sys->i_throtle_users > 0 ) && if( ( p_vod->p_sys->i_throtle_users > 0 ) &&
( p_vod->p_sys->i_connections >= p_vod->p_sys->i_throtle_users ) ) ( p_vod->p_sys->i_connections >= p_vod->p_sys->i_throtle_users ) )
{ {
answer->i_status = 500; // FIXME: GET THE RIGHT ERROR STATUS answer->i_status = 503;
answer->psz_status = strdup( "Too many connections" ); answer->psz_status = strdup( "Too many connections" );
answer->i_body = 0; answer->i_body = 0;
answer->p_body = NULL; answer->p_body = NULL;
...@@ -715,7 +715,6 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl, ...@@ -715,7 +715,6 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
p_rtsp = RtspClientGet( p_media, psz_session ); p_rtsp = RtspClientGet( p_media, psz_session );
if( !p_rtsp ) if( !p_rtsp )
{ {
/* FIXME right error code */
answer->i_status = 454; answer->i_status = 454;
answer->psz_status = strdup( "Unknown session id" ); answer->psz_status = strdup( "Unknown session id" );
answer->i_body = 0; answer->i_body = 0;
...@@ -959,7 +958,7 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl, ...@@ -959,7 +958,7 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl,
if( ( p_vod->p_sys->i_throtle_users > 0 ) && if( ( p_vod->p_sys->i_throtle_users > 0 ) &&
( p_vod->p_sys->i_connections >= p_vod->p_sys->i_throtle_users ) ) ( p_vod->p_sys->i_connections >= p_vod->p_sys->i_throtle_users ) )
{ {
answer->i_status = 500; // FIXME: GET THE RIGHT ERROR STATUS answer->i_status = 503;
answer->psz_status = strdup( "Too many connections" ); answer->psz_status = strdup( "Too many connections" );
answer->i_body = 0; answer->i_body = 0;
answer->p_body = NULL; answer->p_body = NULL;
...@@ -973,7 +972,6 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl, ...@@ -973,7 +972,6 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl,
p_rtsp = RtspClientGet( p_media, psz_session ); p_rtsp = RtspClientGet( p_media, psz_session );
if( !p_rtsp ) if( !p_rtsp )
{ {
/* FIXME right error code */
answer->i_status = 454; answer->i_status = 454;
answer->psz_status = strdup( "Unknown session id" ); answer->psz_status = strdup( "Unknown session id" );
answer->i_body = 0; answer->i_body = 0;
......
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