aboutsummaryrefslogtreecommitdiff
path: root/lib/pipeline.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-05-07 09:00:20 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-05-18 08:57:18 +0200
commit591a6933da7140693fba8df958355b1929c81e4a (patch)
treefdb5e6d57fed6446ffeec76ca6a34a51e9d8c215 /lib/pipeline.c
parente91aedd84020674e14f2e2f7c533ca1c0db88bec (diff)
pipeline: move function to pipeline.c and make static
... as it was only used from there.
Diffstat (limited to 'lib/pipeline.c')
-rw-r--r--lib/pipeline.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/pipeline.c b/lib/pipeline.c
index 365ab00dc..744151d0b 100644
--- a/lib/pipeline.c
+++ b/lib/pipeline.c
@@ -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 */