From: Amos Jeffries Date: Sun, 8 Jan 2017 05:12:44 +0000 (+1300) Subject: Cleanup: remove client_side_request.cci file X-Git-Tag: M-staged-PR71~315 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a6cca0171961ba23d93d02b0253578bcaa1a939;p=thirdparty%2Fsquid.git Cleanup: remove client_side_request.cci file ... moving the methods to client_side_request.h/cc. --- diff --git a/src/Makefile.am b/src/Makefile.am index 1239d6dfa3..84fa31f905 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -501,7 +501,6 @@ EXTRA_squid_SOURCES = \ $(LOADABLE_MODULES_SOURCES) noinst_HEADERS = \ - client_side_request.cci \ MemBuf.h \ SquidString.h \ SquidTime.h diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 5c3764bfa3..b43acdd0eb 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -1849,10 +1849,6 @@ ClientHttpRequest::doCallouts() #endif } -#if !_USE_INLINE_ -#include "client_side_request.cci" -#endif - #if USE_ADAPTATION /// Initiate an asynchronous adaptation transaction which will call us back. void diff --git a/src/client_side_request.cci b/src/client_side_request.cci deleted file mode 100644 index 51710fd953..0000000000 --- a/src/client_side_request.cci +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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_; -} - diff --git a/src/client_side_request.h b/src/client_side_request.h index a3ce992df4..2ba414cd27 100644 --- a/src/client_side_request.h +++ b/src/client_side_request.h @@ -15,6 +15,7 @@ #include "clientStream.h" #include "HttpHeaderRange.h" #include "LogTags.h" +#include "Store.h" #if USE_ADAPTATION #include "adaptation/forward.h" @@ -48,19 +49,28 @@ public: 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. @@ -189,10 +199,5 @@ void clientAccessCheck(ClientHttpRequest *); /* ones that should be elsewhere */ void tunnelStart(ClientHttpRequest *); -#if _USE_INLINE_ -#include "client_side_request.cci" -#include "Store.h" -#endif - #endif /* SQUID_CLIENTSIDEREQUEST_H */ diff --git a/src/tests/stub_client_side_request.cc b/src/tests/stub_client_side_request.cc index 440f13fa30..915b6793b1 100644 --- a/src/tests/stub_client_side_request.cc +++ b/src/tests/stub_client_side_request.cc @@ -11,7 +11,3 @@ #include "http/Stream.h" #include "Store.h" -#if !_USE_INLINE_ -#include "client_side_request.cci" -#endif -