From: Amos Jeffries Date: Wed, 22 Sep 2010 14:51:13 +0000 (+1200) Subject: Build errors after audit changes X-Git-Tag: take08~55^2~124^2~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=802540f235d2bf10fb028e1fdfb171640e764ebd;p=thirdparty%2Fsquid.git Build errors after audit changes --- diff --git a/src/comm/AcceptLimiter.cc b/src/comm/AcceptLimiter.cc index cad3c324a0..a3ce69935a 100644 --- a/src/comm/AcceptLimiter.cc +++ b/src/comm/AcceptLimiter.cc @@ -41,7 +41,8 @@ Comm::AcceptLimiter::kick() debugs(5, 5, HERE << " size=" << deferred.size()); while (deferred.size() > 0 && fdNFree() >= RESERVED_FD) { /* NP: shift() is equivalent to pop_front(). Giving us a FIFO queue. */ - if ((ConnAcceptor *temp = deferred.shift()) != NULL) { + ConnAcceptor *temp = deferred.shift(); + if (temp != NULL) { debugs(5, 5, HERE << " doing one."); temp->isLimited--; temp->acceptNext(); diff --git a/src/comm/ConnAcceptor.cc b/src/comm/ConnAcceptor.cc index f10f14e1d0..4157094249 100644 --- a/src/comm/ConnAcceptor.cc +++ b/src/comm/ConnAcceptor.cc @@ -259,7 +259,7 @@ Comm::ConnAcceptor::acceptNext() // XXX: obsolete comment? // NP: can't be a const function because syncWithComm() side effects hit theCallSub->callback(). void -Comm::ConnAcceptor::notify(comm_err_t flag, const Comm::ConnectionPointer &newConnDetails) const +Comm::ConnAcceptor::notify(comm_err_t flag, const Comm::ConnectionPointer &newConnDetails) { // listener socket handlers just abandon the port with COMM_ERR_CLOSING // it should only happen when this object is deleted... diff --git a/src/comm/ConnOpener.cc b/src/comm/ConnOpener.cc index b94ef154f4..7c6aa3fd6d 100644 --- a/src/comm/ConnOpener.cc +++ b/src/comm/ConnOpener.cc @@ -136,14 +136,12 @@ Comm::ConnOpener::start() } } - typedef CommCbMemFunT Dialer; - calls_.earlyAbort_ = asyncCall(5, 4, "Comm::ConnOpener::earlyAbort", - Dialer(this, &Comm::ConnOpener::earlyAbort)); + typedef CommCbMemFunT abortDialer; + calls_.earlyAbort_ = JobCallback(5, 4, abortDialer, this, Comm::ConnOpener::earlyAbort); comm_add_close_handler(conn_->fd, calls_.earlyAbort_); - typedef CommCbMemFunT Dialer; - calls_.timeout_ = asyncCall(5, 4, "Comm::ConnOpener::timeout", - Dialer(this, &Comm::ConnOpener::timeout)); + typedef CommCbMemFunT timeoutDialer; + calls_.timeout_ = JobCallback(5, 4, timeoutDialer, this, Comm::ConnOpener::timeout); debugs(5, 3, HERE << conn_ << " timeout " << connectTimeout_); commSetTimeout(conn_->fd, connectTimeout_, calls_.timeout_); diff --git a/src/comm/ConnOpener.h b/src/comm/ConnOpener.h index 2a5c0c7c0b..afb8731a92 100644 --- a/src/comm/ConnOpener.h +++ b/src/comm/ConnOpener.h @@ -57,7 +57,7 @@ private: time_t connectTimeout_; /// time at which this series of connection attempts was started. - time_t connStart_; + time_t connectStart_; /// handles to calls which we may need to cancel. struct Calls { diff --git a/src/comm/Connection.cc b/src/comm/Connection.cc index d1bdc16d95..b8987e82a7 100644 --- a/src/comm/Connection.cc +++ b/src/comm/Connection.cc @@ -23,7 +23,8 @@ Comm::Connection::Connection() : Comm::Connection::~Connection() { close(); - cbdataReferenceDone(getPeer()); + if (getPeer()) + cbdataReferenceDone(_peer); } Comm::ConnectionPointer @@ -36,7 +37,7 @@ Comm::Connection::copyDetails() const c->peerType = peerType; c->tos = tos; c->flags = flags; - + // ensure FD is not open in the new copy. c->fd = -1; @@ -57,7 +58,7 @@ Comm::Connection::close() } } -peer * +peer * const Comm::Connection::getPeer() const { if (cbdataReferenceValid(_peer))