]> git.sesse.net Git - vlc/commitdiff
Fix error code when server is overloaded
authorRémi Denis-Courmont <rem@videolan.org>
Fri, 3 Mar 2006 22:43:22 +0000 (22:43 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 3 Mar 2006 22:43:22 +0000 (22:43 +0000)
modules/misc/rtsp.c

index 8150d9c607f8d20952ba1c9178fd3d470311f96b..566956f6bf7ebb283a918a5fcadc7a1b06c13ff4 100644 (file)
@@ -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 ) &&
                         ( 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->i_body = 0;
                         answer->p_body = NULL;
@@ -715,7 +715,6 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
                     p_rtsp = RtspClientGet( p_media, psz_session );
                     if( !p_rtsp )
                     {
-                        /* FIXME right error code */
                         answer->i_status = 454;
                         answer->psz_status = strdup( "Unknown session id" );
                         answer->i_body = 0;
@@ -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 ) &&
                         ( 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->i_body = 0;
                         answer->p_body = NULL;
@@ -973,7 +972,6 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl,
                     p_rtsp = RtspClientGet( p_media, psz_session );
                     if( !p_rtsp )
                     {
-                        /* FIXME right error code */
                         answer->i_status = 454;
                         answer->psz_status = strdup( "Unknown session id" );
                         answer->i_body = 0;