From: rousskov <> Date: Wed, 13 Feb 2008 07:00:57 +0000 (+0000) Subject: Merging async-call branch changes to HEAD: X-Git-Tag: BASIC_TPROXY4~93 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38f44c6a67b80457b0605bd2c1fc1e3e543cf57b;p=thirdparty%2Fsquid.git Merging async-call branch changes to HEAD: Async-call work replaces event-based asynchronous calls with stand-alone implementation. The common async call API allows Squid core do call, debug, and troubleshoot all callback handlers in a uniform way. An async "job" API is introduced to manage independent logical threads or work such as protocol transaction handlers on client, server, and ICAP sides. These jobs should communicate with each other using async calls to minimize dependencies and avoid reentrant callback loops. These changes will eventually improve overall code quality, debugging quality, and Squid robustness. Below you will find log messages from the async-call branch that are relevant to the file(s) being committed. Made comm_read and comm_write calls to use the new CommCalls. Converted the ConnStateData related code in client_side.cc to use CommCalls. BodyPipe now uses the new job calls interface. Many changes in BodyPipe's related code. --- diff --git a/src/client_side_request.cci b/src/client_side_request.cci index 141036bf44..c32b249383 100644 --- a/src/client_side_request.cci +++ b/src/client_side_request.cci @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.cci,v 1.5 2006/05/11 21:29:02 wessels Exp $ + * $Id: client_side_request.cci,v 1.6 2008/02/13 00:00:57 rousskov Exp $ * * DEBUG: section 85 Client-side Request Routines * AUTHOR: Robert Collins @@ -49,23 +49,33 @@ ClientHttpRequest::memObject() const return NULL; } -ConnStateData::Pointer +ConnStateData * ClientHttpRequest::getConn() { + if(!cbdataReferenceValid(conn_)) + return NULL; + return conn_; } -ConnStateData::Pointer const +ConnStateData * const ClientHttpRequest::getConn() const { + if(!cbdataReferenceValid(conn_)) + return NULL; + return conn_; } void -ClientHttpRequest::setConn(ConnStateData::Pointer aConn) +ClientHttpRequest::setConn(ConnStateData * aConn) { assert (conn_ == NULL || aConn == NULL); - conn_ = aConn; + + if(conn_) + cbdataReferenceDone(conn_); + + conn_ = cbdataReference(aConn); } StoreEntry *