From 8a42c2ef8d36450c96375ae8e1669b191061ee02 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 5 Aug 2013 10:58:39 +0200 Subject: cleanup: removed one function, made one static Moved Curl_easy_addmulti() from easy.c to multi.c, renamed it to easy_addmulti and made it static. Removed Curl_easy_initHandleData() and uses of it since it was emptied in commit cdda92ab67b47d74a. --- lib/multi.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'lib/multi.c') diff --git a/lib/multi.c b/lib/multi.c index 476f058c5..15e0e06db 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -329,6 +329,14 @@ CURLM *curl_multi_init(void) CURL_CONNECTION_HASH_SIZE); } +/* + * Store a pointed to the multi handle within the easy handle's data struct. + */ +static void easy_addmulti(struct SessionHandle *data, + void *multi) +{ + data->multi = multi; +} CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle) @@ -391,7 +399,7 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, is associated now with the multi handle which lacked one. */ if(new_closure) { multi->closure_handle = new_closure; - Curl_easy_addmulti(multi->closure_handle, multi_handle); + easy_addmulti(multi->closure_handle, multi_handle); multi->closure_handle->state.conn_cache = multi->conn_cache; } @@ -449,7 +457,7 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, } /* make the SessionHandle refer back to this multi handle */ - Curl_easy_addmulti(data, multi_handle); + easy_addmulti(easy_handle, multi_handle); /* Set the timeout for this handle to expire really soon so that it will be taken care of even when this handle is added in the midst of operation @@ -590,8 +598,8 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle, easy->easy_conn = NULL; } - Curl_easy_addmulti(easy, NULL); /* clear the association - to this multi handle */ + easy_addmulti(easy, NULL); /* clear the association to this multi + handle */ { /* make sure there's no pending message in the queue sent from this easy @@ -1849,7 +1857,7 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle) /* Clear the pointer to the connection cache */ easy->state.conn_cache = NULL; - Curl_easy_addmulti(easy, NULL); /* clear the association */ + easy_addmulti(easy, NULL); /* clear the association */ easy = nexteasy; } -- cgit v1.2.3