From d6f1c74330818325bd244e09150e43c997576ba7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 13 May 2015 14:24:30 +0200 Subject: pipeline: switch some code over to functions ... to "compartmentalize" a bit and make it easier to change behavior when multiplexing is used instead of good old pipelining. --- lib/url.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index a07aaa837..3425039de 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2885,15 +2885,14 @@ void Curl_getoff_all_pipelines(struct SessionHandle *data, struct connectdata *conn) { bool recv_head = (conn->readchannel_inuse && - (gethandleathead(conn->recv_pipe) == data)) ? TRUE : FALSE; - + Curl_recvpipe_head(data, conn)); bool send_head = (conn->writechannel_inuse && - (gethandleathead(conn->send_pipe) == data)) ? TRUE : FALSE; + Curl_sendpipe_head(data, conn)); if(Curl_removeHandleFromPipeline(data, conn->recv_pipe) && recv_head) - conn->readchannel_inuse = FALSE; + Curl_pipeline_leave_read(conn); if(Curl_removeHandleFromPipeline(data, conn->send_pipe) && send_head) - conn->writechannel_inuse = FALSE; + Curl_pipeline_leave_write(conn); } static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke) -- cgit v1.2.3