/*
- * $Id: client_side.cc,v 1.749 2007/04/20 07:29:47 wessels Exp $
+ * $Id: client_side.cc,v 1.750 2007/04/20 22:17:06 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
ClientSocketContext::fd() const
{
assert (http);
- assert (http->getConn().getRaw() != NULL);
+ assert (http->getConn() != NULL);
return http->getConn()->fd;
}
ClientSocketContext::removeFromConnectionList(ConnStateData::Pointer conn)
{
ClientSocketContext::Pointer *tempContextPointer;
- assert(conn.getRaw() != NULL);
- assert(conn->getCurrentContext().getRaw() != NULL);
+ assert(conn != NULL);
+ assert(conn->getCurrentContext() != NULL);
/* Unlink us from the connection request list */
tempContextPointer = & conn->currentobject;
{
assert (!connRegistered_);
assert (http);
- assert (http->getConn().getRaw() != NULL);
+ assert (http->getConn() != NULL);
connRegistered_ = true;
http->getConn()->addContextToQueue(this);
}
ClientSocketContext::connIsFinished()
{
assert (http);
- assert (http->getConn().getRaw() != NULL);
+ assert (http->getConn() != NULL);
deRegisterWithConn();
/* we can't handle any more stream data - detach */
clientStreamDetach(getTail(), http);
if (loggingEntry() && loggingEntry()->mem_obj)
al.cache.objectSize = loggingEntry()->contentLen();
- al.cache.caddr = getConn().getRaw() != NULL ? getConn()->log_addr : no_addr;
+ al.cache.caddr = getConn() != NULL ? getConn()->log_addr : no_addr;
al.cache.size = out.size;
if (request)
clientPrepareLogWithRequestDetails(request, &al);
- if (getConn().getRaw() != NULL && getConn()->rfc931[0])
+ if (getConn() != NULL && getConn()->rfc931[0])
al.cache.rfc931 = getConn()->rfc931;
#if USE_SSL
- if (getConn().getRaw() != NULL)
+ if (getConn() != NULL)
al.cache.ssluser = sslGetUserEmail(fd_table[getConn()->fd].ssl);
#endif
accessLogLog(&al, checklist);
updateCounters();
- if (getConn().getRaw() != NULL)
+ if (getConn() != NULL)
clientdbUpdate(getConn()->peer.sin_addr, logType, PROTO_HTTP, out.size);
}
bool
ConnStateData::isOpen() const
{
- return openReference.getRaw() != NULL;
+ return openReference != NULL;
}
ConnStateData::~ConnStateData()
int
connIsUsable(ConnStateData::Pointer conn)
{
- if (conn.getRaw() == NULL || conn->fd == -1)
+ if (conn == NULL || conn->fd == -1)
return 0;
return 1;
assert(cbdataReferenceValid(node));
assert(node->node.next == NULL);
ClientSocketContext::Pointer context = dynamic_cast<ClientSocketContext *>(node->data.getRaw());
- assert(context.getRaw() != NULL);
+ assert(context != NULL);
assert(connIsUsable(http->getConn()));
fd = http->getConn()->fd;
/* TODO: check offset is what we asked for */
/*
- * $Id: client_side_reply.cc,v 1.117 2007/04/17 05:40:18 wessels Exp $
+ * $Id: client_side_reply.cc,v 1.118 2007/04/20 22:17:06 wessels Exp $
*
* DEBUG: section 88 Client-side Reply Routines
* AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
* A refcounted pointer so that FwdState stays around as long as
* this clientReplyContext does
*/
- FwdState::fwdStart(http->getConn().getRaw() != NULL ? http->getConn()->fd : -1,
+ FwdState::fwdStart(http->getConn() != NULL ? http->getConn()->fd : -1,
http->storeEntry(),
http->request);
/* Register with storage manager to receive updates when data comes in. */
if (http->flags.internal)
r->protocol = PROTO_INTERNAL;
- FwdState::fwdStart(http->getConn().getRaw() != NULL ? http->getConn()->fd : -1,
+ FwdState::fwdStart(http->getConn() != NULL ? http->getConn()->fd : -1,
http->storeEntry(),
r);
}
debug(88, 1) ("WARNING: closing FD %d to prevent counter overflow\n",
fd);
debug(88, 1) ("\tclient %s\n",
- inet_ntoa(http->getConn().getRaw() != NULL ? http->getConn()->peer.sin_addr : no_addr));
+ inet_ntoa(http->getConn() != NULL ? http->getConn()->peer.sin_addr : no_addr));
debug(88, 1) ("\treceived %d bytes\n", (int) http->out.size);
debug(88, 1) ("\tURI %s\n", http->log_uri);
return 1;
debug(88, 1) ("WARNING: closing FD %d to prevent counter overflow\n",
fd);
debug(88, 1) ("\tclient %s\n",
- inet_ntoa(http->getConn().getRaw() != NULL ? http->getConn()->peer.sin_addr : no_addr));
+ inet_ntoa(http->getConn() != NULL ? http->getConn()->peer.sin_addr : no_addr));
debug(88, 1) ("\treceived %d bytes (offset %d)\n", (int) http->out.size,
(int) http->out.offset);
debug(88, 1) ("\tURI %s\n", http->log_uri);
if (http->isReplyBodyTooLarge(reply->content_length)) {
ErrorState *err =
clientBuildError(ERR_TOO_BIG, HTTP_FORBIDDEN, NULL,
- http->getConn().getRaw() != NULL ? &http->getConn()->peer.sin_addr : &no_addr,
+ http->getConn() != NULL ? &http->getConn()->peer.sin_addr : &no_addr,
http->request);
removeClientStoreReference(&sc, http);
HTTPMSGUNLOCK(reply);
err =
clientBuildError(page_id, HTTP_FORBIDDEN, NULL,
- http->getConn().getRaw() != NULL ? &http->getConn()->peer.sin_addr : &no_addr,
+ http->getConn() != NULL ? &http->getConn()->peer.sin_addr : &no_addr,
http->request);
removeClientStoreReference(&sc, http);
ConnStateData::Pointer conn = http->getConn();
- int fd = conn.getRaw() != NULL ? conn->fd : -1;
+ int fd = conn != NULL ? conn->fd : -1;
char *buf = next()->readBuffer.data;
/*
- * $Id: client_side_request.cc,v 1.80 2007/04/06 04:50:06 rousskov Exp $
+ * $Id: client_side_request.cc,v 1.81 2007/04/20 22:17:06 wessels Exp $
*
* DEBUG: section 85 Client-side Request Routines
* AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
AclMatchedName ? AclMatchedName : "NO ACL's");
char const *proxy_auth_msg = "<null>";
- if (http->getConn().getRaw() != NULL && http->getConn()->auth_user_request != NULL)
+ if (http->getConn() != NULL && http->getConn()->auth_user_request != NULL)
proxy_auth_msg = http->getConn()->auth_user_request->denyMessage("<null>");
else if (http->request->auth_user_request != NULL)
proxy_auth_msg = http->request->auth_user_request->denyMessage("<null>");
assert (repContext);
repContext->setReplyToError(page_id, status,
http->request->method, NULL,
- http->getConn().getRaw() != NULL ? &http->getConn()->peer.sin_addr : &no_addr, http->request,
- NULL, http->getConn().getRaw() != NULL
+ http->getConn() != NULL ? &http->getConn()->peer.sin_addr : &no_addr, http->request,
+ NULL, http->getConn() != NULL
&& http->getConn()->auth_user_request ? http->getConn()->
auth_user_request : http->request->auth_user_request);
node = (clientStreamNode *)http->client_stream.tail->data;
#if USE_USERAGENT_LOG
if ((str = req_hdr->getStr(HDR_USER_AGENT)))
- logUserAgent(fqdnFromAddr(http->getConn().getRaw() ? http->getConn()->log_addr : no_addr), str);
+ logUserAgent(fqdnFromAddr(http->getConn() != NULL ? http->getConn()->log_addr : no_addr), str);
#endif
#if USE_REFERER_LOG
if ((str = req_hdr->getStr(HDR_REFERER)))
- logReferer(fqdnFromAddr(http->getConn().getRaw() ? http->getConn()->log_addr : no_addr), str, http->log_uri);
+ logReferer(fqdnFromAddr(http->getConn() != NULL ? http->getConn()->log_addr : no_addr), str, http->log_uri);
#endif
#if FORW_VIA_DB