diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-17 00:11:37 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-17 00:11:37 +0100 |
commit | 516a9c69222bed3d6fee7aefb439b461e4173da0 (patch) | |
tree | e3a0fcb218add909a37e153cd99651fcb65809f8 | |
parent | 7885d0f3dc255cd7900ee1d398366636c48bcda1 (diff) |
No idea why http_dorequest() ever returned void*. Don't hide the type, it's
not a secret (the pointer is shared with a type later anyway).
-rw-r--r-- | lib/http_client.c | 7 | ||||
-rw-r--r-- | lib/http_client.h | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/lib/http_client.c b/lib/http_client.c index dd5f5563..529be578 100644 --- a/lib/http_client.c +++ b/lib/http_client.c @@ -34,9 +34,10 @@ static gboolean http_connected( gpointer data, int source, b_input_condition cond ); static gboolean http_ssl_connected( gpointer data, void *source, b_input_condition cond ); static gboolean http_incoming_data( gpointer data, int source, b_input_condition cond ); +static void http_free( struct http_request *req ); -void *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data ) +struct http_request *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data ) { struct http_request *req; int error = 0; @@ -71,7 +72,7 @@ void *http_dorequest( char *host, int port, int ssl, char *request, http_input_f return( req ); } -void *http_dorequest_url( char *url_string, http_input_function func, gpointer data ) +struct http_request *http_dorequest_url( char *url_string, http_input_function func, gpointer data ) { url_t *url = g_new0( url_t, 1 ); char *request; @@ -445,7 +446,7 @@ cleanup: return FALSE; } -void http_free( struct http_request *req ) +static void http_free( struct http_request *req ) { g_free( req->request ); g_free( req->reply_headers ); diff --git a/lib/http_client.h b/lib/http_client.h index 726c97a6..27c484ff 100644 --- a/lib/http_client.h +++ b/lib/http_client.h @@ -80,7 +80,5 @@ struct http_request version is probably only useful if you want to do POST requests or if you want to add some extra headers. As you can see, HTTPS connections are also supported (using ssl_client). */ -void *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data ); -void *http_dorequest_url( char *url_string, http_input_function func, gpointer data ); - -void http_free( struct http_request *req ); +struct http_request *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data ); +struct http_request *http_dorequest_url( char *url_string, http_input_function func, gpointer data ); |