pipeline: move function to pipeline.c and make static
authorDaniel Stenberg <daniel@haxx.se>
Thu, 7 May 2015 07:00:20 +0000 (09:00 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 18 May 2015 06:57:18 +0000 (08:57 +0200)
... as it was only used from there.

lib/pipeline.c
lib/url.c

index 365ab00dc2836a753c6d27c711ca00b5603bef2b..744151d0bd06ac9608c1d88488c66234f3629602 100644 (file)
@@ -91,6 +91,15 @@ bool Curl_pipeline_penalized(struct SessionHandle *data,
   return FALSE;
 }
 
+static CURLcode addHandleToPipeline(struct SessionHandle *data,
+                                    struct curl_llist *pipeline)
+{
+  if(!Curl_llist_insert_next(pipeline, pipeline->tail, data))
+    return CURLE_OUT_OF_MEMORY;
+  return CURLE_OK;
+}
+
+
 CURLcode Curl_add_handle_to_pipeline(struct SessionHandle *handle,
                                      struct connectdata *conn)
 {
@@ -100,7 +109,7 @@ CURLcode Curl_add_handle_to_pipeline(struct SessionHandle *handle,
 
   pipeline = conn->send_pipe;
 
-  result = Curl_addHandleToPipeline(handle, pipeline);
+  result = addHandleToPipeline(handle, pipeline);
 
   if(pipeline == conn->send_pipe && sendhead != conn->send_pipe->head) {
     /* this is a new one as head, expire it */
index dde53f0e45a5ce4c59fc7f4b2f788f646c3d8b26..bdda991c80de0e91474e69aba4566bce21ae91ed 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2835,14 +2835,6 @@ bool Curl_isPipeliningEnabled(const struct SessionHandle *handle)
   return Curl_multi_pipeline_enabled(handle->multi);
 }
 
-CURLcode Curl_addHandleToPipeline(struct SessionHandle *data,
-                                  struct curl_llist *pipeline)
-{
-  if(!Curl_llist_insert_next(pipeline, pipeline->tail, data))
-    return CURLE_OUT_OF_MEMORY;
-  return CURLE_OK;
-}
-
 int Curl_removeHandleFromPipeline(struct SessionHandle *handle,
                                   struct curl_llist *pipeline)
 {