From a3f122d66756626bdd69ad00757ea8208cc38021 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 7 Nov 2007 07:33:16 +0000 Subject: [PATCH] r16506@catbus: nickm | 2007-11-07 01:29:59 -0500 Make all rpc and http functions not prototyped in evrpc.h and evhttp.h into static functions. I believe that these functions were meant to be private, yes? svn:r494 --- evrpc.c | 2 +- http.c | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/evrpc.c b/evrpc.c index 63378326..8c9031a9 100644 --- a/evrpc.c +++ b/evrpc.c @@ -190,7 +190,7 @@ void evrpc_request_done(struct evrpc_req_generic*); * calls this function. */ -char * +static char * evrpc_construct_uri(const char *uri) { char *constructed_uri; diff --git a/http.c b/http.c index fcaab41f..3e53a90c 100644 --- a/http.c +++ b/http.c @@ -226,7 +226,7 @@ evhttp_htmlescape(const char *html) return (escaped_html); } -const char * +static const char * evhttp_method(enum evhttp_cmd_type type) { const char *method; @@ -597,12 +597,12 @@ evhttp_write(int fd, short what, void *arg) (*evcon->cb)(evcon, evcon->cb_arg); } -void +static void evhttp_connection_done(struct evhttp_connection *evcon) { struct evhttp_request *req = TAILQ_FIRST(&evcon->requests); int con_outgoing = evcon->flags & EVHTTP_CON_OUTGOING; - + /* * if this is an incoming connection, we need to leave the request * on the connection, so that we can reply to it. @@ -706,7 +706,7 @@ evhttp_handle_chunked_read(struct evhttp_request *req, struct evbuffer *buf) return (0); } -void +static void evhttp_read_body(struct evhttp_connection *evcon, struct evhttp_request *req) { struct evbuffer *buf = evcon->input_buffer; @@ -776,7 +776,7 @@ evhttp_read(int fd, short what, void *arg) evhttp_read_body(evcon, req); } -void +static void evhttp_write_connectioncb(struct evhttp_connection *evcon, void *arg) { /* This is after writing the request to the server */ @@ -1000,7 +1000,7 @@ evhttp_connectioncb(int fd, short what, void *arg) * Check if we got a valid response code. */ -int +static int evhttp_valid_response_code(int code) { if (code == 0) @@ -1011,7 +1011,7 @@ evhttp_valid_response_code(int code) /* Parses the status line of a web server */ -int +static int evhttp_parse_response_line(struct evhttp_request *req, char *line) { char *protocol; @@ -1053,7 +1053,7 @@ evhttp_parse_response_line(struct evhttp_request *req, char *line) /* Parse the first line of a HTTP request */ -int +static int evhttp_parse_request_line(struct evhttp_request *req, char *line) { char *method; @@ -1581,7 +1581,7 @@ evhttp_start_read(struct evhttp_connection *evcon) evhttp_add_event(&evcon->ev, evcon->timeout, HTTP_READ_TIMEOUT); } -void +static void evhttp_send_done(struct evhttp_connection *evcon, void *arg) { int need_close; @@ -1893,7 +1893,7 @@ evhttp_dispatch_callback(struct httpcbq *callbacks, struct evhttp_request *req) return (NULL); } -void +static void evhttp_handle_request(struct evhttp_request *req, void *arg) { struct evhttp *http = arg; @@ -1981,7 +1981,7 @@ evhttp_bind_socket(struct evhttp *http, const char *address, u_short port) } static struct evhttp* -evhttp_new_object() +evhttp_new_object(void) { struct evhttp *http = NULL;