Commit fe189157 authored by alex's avatar alex

make those nasty variables static, also fix a html bug


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5044 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c5ffec50
...@@ -232,10 +232,10 @@ typedef struct FeedData { ...@@ -232,10 +232,10 @@ typedef struct FeedData {
struct sockaddr_in my_http_addr; struct sockaddr_in my_http_addr;
struct sockaddr_in my_rtsp_addr; struct sockaddr_in my_rtsp_addr;
char logfilename[1024]; static char logfilename[1024];
HTTPContext *first_http_ctx; static HTTPContext *first_http_ctx;
FFStream *first_feed; /* contains only feeds */ static FFStream *first_feed; /* contains only feeds */
FFStream *first_stream; /* contains all streams, including feeds */ static FFStream *first_stream; /* contains all streams, including feeds */
static void new_connection(int server_fd, int is_rtsp); static void new_connection(int server_fd, int is_rtsp);
static void close_connection(HTTPContext *c); static void close_connection(HTTPContext *c);
...@@ -278,11 +278,11 @@ static int ffserver_daemon; ...@@ -278,11 +278,11 @@ static int ffserver_daemon;
static int no_launch; static int no_launch;
static int need_to_start_children; static int need_to_start_children;
int nb_max_connections; static int nb_max_connections;
int nb_connections; static int nb_connections;
int max_bandwidth; static int max_bandwidth;
int current_bandwidth; static int current_bandwidth;
static long cur_time; // Making this global saves on passing it around everywhere static long cur_time; // Making this global saves on passing it around everywhere
...@@ -1298,8 +1298,8 @@ static int http_parse_request(HTTPContext *c) ...@@ -1298,8 +1298,8 @@ static int http_parse_request(HTTPContext *c)
q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Content-type: text/html\r\n"); q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "Content-type: text/html\r\n");
q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "\r\n"); q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "\r\n");
q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<html><head><title>Too busy</title></head><body>\r\n"); q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<html><head><title>Too busy</title></head><body>\r\n");
q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "The server is too busy to serve your request at this time.<p>\r\n"); q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<p>The server is too busy to serve your request at this time.</p>\r\n");
q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "The bandwidth being served (including your stream) is %dkbit/sec, and this exceeds the limit of %dkbit/sec\r\n", q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "<p>The bandwidth being served (including your stream) is %dkbit/sec, and this exceeds the limit of %dkbit/sec.</p>\r\n",
current_bandwidth, max_bandwidth); current_bandwidth, max_bandwidth);
q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "</body></html>\r\n"); q += snprintf(q, q - (char *) c->buffer + c->buffer_size, "</body></html>\r\n");
......
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