+++ /dev/null
-/*
- * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-/* DEBUG: section 85 Client-side Request Routines */
-
-#include "Store.h"
-
-StoreEntry *
-ClientHttpRequest::storeEntry() const
-{
- return entry_;
-}
-
-MemObject *
-ClientHttpRequest::memObject() const
-{
- if (storeEntry())
- return storeEntry()->mem_obj;
-
- return NULL;
-}
-
-ConnStateData *
-ClientHttpRequest::getConn() const
-{
- if (!cbdataReferenceValid(conn_))
- return NULL;
-
- return conn_;
-}
-
-void
-ClientHttpRequest::setConn(ConnStateData * aConn)
-{
- assert (conn_ == NULL || aConn == NULL);
-
- if (conn_)
- cbdataReferenceDone(conn_);
-
- conn_ = cbdataReference(aConn);
-}
-
-StoreEntry *
-ClientHttpRequest::loggingEntry() const
-{
- return loggingEntry_;
-}
-
#include "clientStream.h"
#include "HttpHeaderRange.h"
#include "LogTags.h"
+#include "Store.h"
#if USE_ADAPTATION
#include "adaptation/forward.h"
void freeResources();
void updateCounters();
void logRequest();
- _SQUID_INLINE_ MemObject * memObject() const;
+ MemObject * memObject() const {
+ return (storeEntry() ? storeEntry()->mem_obj : nullptr);
+ }
bool multipartRangeRequest() const;
void processRequest();
void httpStart();
bool onlyIfCached()const;
bool gotEnough() const;
- _SQUID_INLINE_ StoreEntry *storeEntry() const;
+ StoreEntry *storeEntry() const { return entry_; }
void storeEntry(StoreEntry *);
- _SQUID_INLINE_ StoreEntry *loggingEntry() const;
+ StoreEntry *loggingEntry() const { return loggingEntry_; }
void loggingEntry(StoreEntry *);
- _SQUID_INLINE_ ConnStateData * getConn() const;
- _SQUID_INLINE_ void setConn(ConnStateData *);
+ ConnStateData * getConn() const {
+ return (cbdataReferenceValid(conn_) ? conn_ : nullptr);
+ }
+ void setConn(ConnStateData *aConn) {
+ if (conn_ != aConn) {
+ cbdataReferenceDone(conn_);
+ conn_ = cbdataReference(aConn);
+ }
+ }
/** Details of the client socket which produced us.
* Treat as read-only for the lifetime of this HTTP request.
/* ones that should be elsewhere */
void tunnelStart(ClientHttpRequest *);
-#if _USE_INLINE_
-#include "client_side_request.cci"
-#include "Store.h"
-#endif
-
#endif /* SQUID_CLIENTSIDEREQUEST_H */