This patch removes client_side_request.cci file, moving the methods
inline
to the client_side_request.h.
Amos
=== modified file 'src/Makefile.am'
--- src/Makefile.am 2017-01-03 13:27:40 +0000
+++ src/Makefile.am 2017-01-05 13:18:24 +0000
@@ -502,7 +502,6 @@
$(LOADABLE_MODULES_SOURCES)
noinst_HEADERS = \
- client_side_request.cci \
MemBuf.h \
String.cci \
SquidString.h \
=== modified file 'src/client_side_request.cc'
--- src/client_side_request.cc 2017-01-01 00:12:22 +0000
+++ src/client_side_request.cc 2017-01-05 13:18:50 +0000
@@ -1849,10 +1849,6 @@
#endif
}
-#if !_USE_INLINE_
-#include "client_side_request.cci"
-#endif
-
#if USE_ADAPTATION
/// Initiate an asynchronous adaptation transaction which will call us back.
void
=== removed file 'src/client_side_request.cci'
--- src/client_side_request.cci 2017-01-01 00:12:22 +0000
+++ src/client_side_request.cci 1970-01-01 00:00:00 +0000
@@ -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_;
-}
-
=== modified file 'src/client_side_request.h'
--- src/client_side_request.h 2017-01-01 00:12:22 +0000
+++ src/client_side_request.h 2017-01-05 14:09:37 +0000
@@ -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 @@
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 @@
/* ones that should be elsewhere */
void tunnelStart(ClientHttpRequest *);
-#if _USE_INLINE_
-#include "client_side_request.cci"
-#include "Store.h"
-#endif
-
#endif /* SQUID_CLIENTSIDEREQUEST_H */
=== modified file 'src/tests/stub_client_side_request.cc'
--- src/tests/stub_client_side_request.cc 2017-01-01 00:12:22 +0000
+++ src/tests/stub_client_side_request.cc 2017-01-05 13:25:52 +0000
@@ -11,7 +11,3 @@
#include "http/Stream.h"
#include "Store.h"
-#if !_USE_INLINE_
-#include "client_side_request.cci"
-#endif
-
_______________________________________________
squid-dev mailing list
[email protected]
http://lists.squid-cache.org/listinfo/squid-dev