]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Audit review changes
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 24 May 2011 10:44:39 +0000 (22:44 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 24 May 2011 10:44:39 +0000 (22:44 +1200)
src/Server.cc
src/Server.h
src/acl/Asn.cc
src/comm/Connection.h
src/ftp.cc
src/http.cc
src/http.h
src/icmp/net_db.cc
src/peer_digest.cc
src/urn.cc

index 754fc44957f8e50777f6973d455c752751e6e790..4b282e36e91469cc9cb3e36fe2e65e80700a0149 100644 (file)
@@ -410,7 +410,7 @@ ServerStateData::sendMoreRequestBody()
     assert(requestBodySource != NULL);
     assert(!requestSender);
 
-    const Comm::ConnectionPointer conn = dataDescriptor();
+    const Comm::ConnectionPointer conn = dataConnection();
 
     if (!Comm::IsConnOpen(conn)) {
         debugs(9,3, HERE << "cannot send request body to closing " << conn);
index 4032ac156880dd32a2b36245f30ea8ac9e001ad4..ce8483b76547ae61e947e5fdf965fe5ab3f7f902 100644 (file)
@@ -68,7 +68,7 @@ public:
     virtual ~ServerStateData();
 
     /// \return primary or "request data connection"
-    virtual const Comm::ConnectionPointer & dataDescriptor() const = 0;
+    virtual const Comm::ConnectionPointer & dataConnection() const = 0;
 
     // BodyConsumer: consume request body or adapted response body.
     // The implementation just calls the corresponding HTTP or ICAP handle*()
index 83fe1b858c30e338456239ece6d2e5a196957ec5..05c5640a9791bcb10be6b0ce5e1337c50b2e8576 100644 (file)
@@ -250,8 +250,7 @@ asnCacheStart(int as)
     if ((e = storeGetPublic(asres, METHOD_GET)) == NULL) {
         e = storeCreateEntry(asres, asres, request_flags(), METHOD_GET);
         asState->sc = storeClientListAdd(e, asState);
-        Comm::ConnectionPointer nul;
-        FwdState::fwdStart(nul, e, asState->request);
+        FwdState::fwdStart(Comm::ConnectionPointer(), e, asState->request);
     } else {
 
         e->lock();
index 712d691db9415a5b50c9d2dff973fe435c4ef50b..7bf2dcf49fe36b634d907177879283d7bde0fd11 100644 (file)
@@ -78,10 +78,9 @@ namespace Comm {
  * object for state data. But a semantic equivalent for FD with easily
  * accessible cached properties not requiring repeated complex lookups.
  *
- * While the properties may be changed, this is for teh purpose of creating
- * potential connection descriptors which may be opened. Properties should
- * be considered read-only outside of the Comm layer code once the connection
- * is open.
+ * Connection properties may be changed until tehe connection is opened.
+ * Properties should be considered read-only outside of the Comm layer
+ * code once the connection is open.
  *
  * These objects must not be passed around directly,
  * but a Comm::ConnectionPointer must be passed instead.
@@ -89,7 +88,6 @@ namespace Comm {
 class Connection : public RefCountable
 {
 public:
-    /** standard empty connection creation */
     Connection();
 
     /** Clear the connection properties and close any open socket. */
@@ -134,7 +132,7 @@ public:
     /** Hierarchy code for this connection link */
     hier_code peerType;
 
-    /** Socket used by this connection. -1 if no socket has been opened. */
+    /** Socket used by this connection. Negative if not open. */
     int fd;
 
     /** Quality of Service TOS values currently sent on this connection */
index f0579736d43634ed19e44961eb03bb8b240f6ed6..8faaae7b524fbb411ad82e5b73343fcb6c1ebc18 100644 (file)
@@ -261,7 +261,7 @@ public:
     void buildTitleUrl();
     void writeReplyBody(const char *, size_t len);
     void printfReplyBody(const char *fmt, ...);
-    virtual const Comm::ConnectionPointer & dataDescriptor() const;
+    virtual const Comm::ConnectionPointer & dataConnection() const;
     virtual void maybeReadVirginBody();
     virtual void closeServer();
     virtual void completeForwarding();
@@ -1178,7 +1178,7 @@ FtpStateData::parseListing()
 }
 
 const Comm::ConnectionPointer &
-FtpStateData::dataDescriptor() const
+FtpStateData::dataConnection() const
 {
     return data.conn;
 }
index fc0b4b8538ca6ead970b2abf31262c2ced77ea3c..2c1c57529b8f1114cdc93a7338ec0ff91ece874c 100644 (file)
@@ -172,7 +172,7 @@ HttpStateData::~HttpStateData()
 }
 
 const Comm::ConnectionPointer &
-HttpStateData::dataDescriptor() const
+HttpStateData::dataConnection() const
 {
     return serverConnection;
 }
index f838e2acc8b99234116b168e26b65deb7d94a5b5..9e30e29960eb84408a00c5afd39f49ca3ec42d39 100644 (file)
@@ -54,7 +54,7 @@ public:
                                        HttpHeader * hdr_out,
                                        const http_state_flags flags);
 
-    virtual const Comm::ConnectionPointer & dataDescriptor() const;
+    virtual const Comm::ConnectionPointer & dataConnection() const;
     /* should be private */
     bool sendRequest();
     void processReplyHeader();
index 51a26f17ddf8aa744861564bb3d2a01a616457dd..3cfb03e4cda54b3b6f851507329117068c6a6d6a 100644 (file)
@@ -1337,8 +1337,7 @@ netdbExchangeStart(void *data)
 
     urlCanonical(ex->r);
 
-    Comm::ConnectionPointer nul;
-    FwdState::fwdStart(nul, ex->e, ex->r);
+    FwdState::fwdStart(Comm::ConnectionPointer(), ex->e, ex->r);
 
 #endif
 }
index 477341a2b6d8a8005f2c2382a1a330f71c213a41..84089c1b5742270de33570512f2a773ab41edc7f 100644 (file)
@@ -393,8 +393,7 @@ peerDigestRequest(PeerDigest * pd)
     /* push towards peer cache */
     debugs(72, 3, "peerDigestRequest: forwarding to fwdStart...");
 
-    Comm::ConnectionPointer nul;
-    FwdState::fwdStart(nul, e, req);
+    FwdState::fwdStart(Comm::ConnectionPointer(), e, req);
 
     tempBuffer.offset = 0;
 
index 0b9affa8b2d26100aee700f80ddd2cdbde97014c..b5f2aca8f6d5c1cc6e35f1e72ed3385bbf31b158 100644 (file)
@@ -256,8 +256,7 @@ UrnState::created(StoreEntry *newEntry)
     if (urlres_e->isNull()) {
         urlres_e = storeCreateEntry(urlres, urlres, request_flags(), METHOD_GET);
         sc = storeClientListAdd(urlres_e, this);
-        Comm::ConnectionPointer nul;
-        FwdState::fwdStart(nul, urlres_e, urlres_r);
+        FwdState::fwdStart(Comm::ConnectionPointer(), urlres_e, urlres_r);
     } else {
 
         urlres_e->lock();