From: Amos Jeffries Date: Fri, 26 Nov 2010 09:57:06 +0000 (+1300) Subject: Build issues X-Git-Tag: take08~55^2~124^2~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25b481e63ad59b3f96889bb7e08d844729b229fa;p=thirdparty%2Fsquid.git Build issues --- diff --git a/src/Makefile.am b/src/Makefile.am index b1e843b224..405f4afb22 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1325,6 +1325,7 @@ tests_testDiskIO_LDADD = \ $(DISK_LIBS) \ $(DISK_OS_LIBS) \ acl/libapi.la \ + comm/libcomm.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ diff --git a/src/cache_manager.cc b/src/cache_manager.cc index a4e62283d7..38ee8cddfe 100644 --- a/src/cache_manager.cc +++ b/src/cache_manager.cc @@ -366,7 +366,7 @@ CacheManager::Start(const Comm::ConnectionPointer &client, HttpRequest * request actionName << "'" ); if (UsingSmp() && IamWorkerProcess()) { - AsyncJob::Start(new Mgr::Forwarder(fd, cmd->params, request, entry)); + AsyncJob::Start(new Mgr::Forwarder(client, cmd->params, request, entry)); return; } diff --git a/src/client_side.cc b/src/client_side.cc index 1ab505f9d8..7e4cd6241d 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -740,9 +740,9 @@ void ConnStateData::swanSong() { debugs(33, 2, HERE << clientConn); - clientConn = NULL; flags.readMoreRequests = false; clientdbEstablished(clientConn->remote, -1); /* decrement */ + clientConn = NULL; assert(areAllContextsForThisConnection()); freeAllContexts(); @@ -2726,7 +2726,7 @@ ConnStateData::clientReadRequest(const CommIoCbParams &io) } assert(Comm::IsConnOpen(clientConn)); - assert(io.conn == clientConn); + assert(io.conn->fd == clientConn->fd); /* * Don't reset the timeout value here. The timeout value will be diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 104d36ff61..a4a0d4cecf 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -1860,7 +1860,7 @@ clientReplyContext::sendPreconditionFailedError() http->logType = LOG_TCP_HIT; ErrorState *const err = clientBuildError(ERR_PRECONDITION_FAILED, HTTP_PRECONDITION_FAILED, - NULL, http->getConn()->peer, http->request); + NULL, http->getConn()->clientConn->remote, http->request); removeClientStoreReference(&sc, http); HTTPMSGUNLOCK(reply); startError(err); diff --git a/src/comm.cc b/src/comm.cc index 49312ace9e..3365de51b5 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -2053,7 +2053,6 @@ commSelectOrQueueWrite(const int fd) #endif commSetSelect(fd, COMM_SELECT_WRITE, commHandleWrite, ccb, 0); ->>>>>>> MERGE-SOURCE } diff --git a/src/comm/Connection.h b/src/comm/Connection.h index fef288f8d2..50155e40ad 100644 --- a/src/comm/Connection.h +++ b/src/comm/Connection.h @@ -42,6 +42,7 @@ #include "hier_code.h" #include "ip/Address.h" #include "RefCount.h" +#include "typedefs.h" #if HAVE_IOSFWD #include diff --git a/src/forward.cc b/src/forward.cc index ff141ec8ce..7d109919dc 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -34,6 +34,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" #include "acl/Gadgets.h" +#include "CacheManager.h" #include "comm/Connection.h" #include "comm/ConnOpener.h" #include "CommCalls.h" @@ -863,11 +864,11 @@ FwdState::connectStart() } #if SO_MARK serverDestinations[0]->nfmark = GetNfmarkToServer(request); - debugs(17, 3, "fwdConnectStart: got outgoing addr " << outgoing << ", tos " << int(tos) + debugs(17, 3, "fwdConnectStart: got outgoing addr " << serverDestinations[0]->local << ", tos " << int(serverDestinations[0]->tos) << ", netfilter mark " << serverDestinations[0]->nfmark); #else serverDestinations[0]->nfmark = 0; - debugs(17, 3, "fwdConnectStart: got outgoing addr " << outgoing << ", tos " << int(tos)); + debugs(17, 3, "fwdConnectStart: got outgoing addr " << serverDestinations[0]->local << ", tos " << int(serverDestinations[0]->tos)); #endif AsyncCall::Pointer call = commCbCall(17,3, "fwdConnectDoneWrapper", CommConnectCbPtrFun(fwdConnectDoneWrapper, this)); diff --git a/src/http.cc b/src/http.cc index bf07e3f3ea..ca099f31df 100644 --- a/src/http.cc +++ b/src/http.cc @@ -2301,7 +2301,7 @@ HttpStateData::handleRequestBodyProducerAborted() { ServerStateData::handleRequestBodyProducerAborted(); if (entry->isEmpty()) { - debugs(11, 3, "request body aborted: FD " << fd); + debugs(11, 3, "request body aborted: " << serverConnection); ErrorState *err; err = errorCon(ERR_READ_ERROR, HTTP_BAD_GATEWAY, fwd->request); err->xerrno = errno; diff --git a/src/icp_v2.cc b/src/icp_v2.cc index 0b9b8b1dbe..c59c13ce18 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -739,7 +739,7 @@ icpConnectionsOpen(void) debugs(12, DBG_CRITICAL, "Sending ICP messages from " << icpOutgoingConn->local); commSetSelect(icpOutgoingConn->fd, COMM_SELECT_READ, icpHandleUdp, NULL, 0); - fd_note(theOutIcpConnection, "Outgoing ICP socket"); + fd_note(icpOutgoingConn->fd, "Outgoing ICP socket"); icpGetOutgoingIpAddress(); } } @@ -750,7 +750,7 @@ static void icpGetOutgoingIpAddress() { struct addrinfo *xai = NULL; - theOutICPAddr.SetEmpty(); + theIcpPrivateHostID.SetEmpty(); theIcpPrivateHostID.InitAddrInfo(xai); if (getsockname(icpOutgoingConn->fd, xai->ai_addr, &xai->ai_addrlen) < 0) debugs(50, DBG_IMPORTANT, "ERROR: Unable to identify ICP host ID to use for " << icpOutgoingConn diff --git a/src/ipc/Coordinator.cc b/src/ipc/Coordinator.cc index fc38a7d273..9bab7cc3ce 100644 --- a/src/ipc/Coordinator.cc +++ b/src/ipc/Coordinator.cc @@ -9,6 +9,7 @@ #include "config.h" #include "base/Subscription.h" #include "base/TextException.h" +#include "CacheManager.h" #include "comm.h" #include "comm/Connection.h" #include "ipc/Coordinator.h" @@ -19,7 +20,6 @@ #include "mgr/Response.h" #include "mgr/StoreToCommWriter.h" - CBDATA_NAMESPACED_CLASS_INIT(Ipc, Coordinator); Ipc::Coordinator* Ipc::Coordinator::TheInstance = NULL; @@ -124,8 +124,8 @@ Ipc::Coordinator::handleCacheMgrRequest(const Mgr::Request& request) Mgr::Action::Pointer action = CacheManager::GetInstance()->createRequestedAction(request.params); - AsyncJob::Start(new Mgr::Inquirer(action, - Mgr::ImportHttpFdIntoComm(request.fd), request, strands_)); + Comm::ConnectionPointer ir = Mgr::ImportHttpFdIntoComm(request.fd); + AsyncJob::Start(new Mgr::Inquirer(action, ir, request, strands_)); } void diff --git a/src/ipc/SharedListen.h b/src/ipc/SharedListen.h index 18486d05e0..2cd8c079ea 100644 --- a/src/ipc/SharedListen.h +++ b/src/ipc/SharedListen.h @@ -9,6 +9,7 @@ #define SQUID_IPC_SHARED_LISTEN_H #include "base/AsyncCall.h" +#include "base/Subscription.h" namespace Ipc { diff --git a/src/tests/stub_comm.cc b/src/tests/stub_comm.cc index c9720edaae..dba1cbfabf 100644 --- a/src/tests/stub_comm.cc +++ b/src/tests/stub_comm.cc @@ -176,8 +176,3 @@ comm_write(int fd, const char *buf, int size, AsyncCall::Pointer &callback, FREE { fatal ("Not implemented"); } - -ConnectionDetail::ConnectionDetail() : me(), peer() -{ - fatal ("Not implemented"); -}