trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [trafficserver] 13/33: TS-4445: Switch CacheRead.cc over to Ptr::get().
Date Wed, 11 May 2016 20:31:37 GMT
This is an automated email from the ASF dual-hosted git repository.

jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 708a284e0272bca7eab2819be5c65b31c11d82ba
Author: James Peach <jpeach@apache.org>
AuthorDate: Thu May 5 20:59:09 2016 -0700

    TS-4445: Switch CacheRead.cc over to Ptr::get().
---
 iocore/cache/CacheRead.cc | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc
index 685426a..b71d375 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -41,7 +41,7 @@ Cache::open_read(Continuation *cont, const CacheKey *key, CacheFragType
type, co
 
   Vol *vol = key_to_vol(key, hostname, host_len);
   Dir result, *last_collision = NULL;
-  ProxyMutex *mutex = cont->mutex;
+  ProxyMutex *mutex = cont->mutex.get();
   OpenDirEntry *od = NULL;
   CacheVC *c = NULL;
   {
@@ -104,7 +104,7 @@ Cache::open_read(Continuation *cont, const CacheKey *key, CacheHTTPHdr
*request,
 
   Vol *vol = key_to_vol(key, hostname, host_len);
   Dir result, *last_collision = NULL;
-  ProxyMutex *mutex = cont->mutex;
+  ProxyMutex *mutex = cont->mutex.get();
   OpenDirEntry *od = NULL;
   CacheVC *c = NULL;
 
@@ -495,7 +495,7 @@ CacheVC::openReadFromWriterMain(int /* event ATS_UNUSED */, Event * /*
e ATS_UNU
      openWriteWriteDone was called. */
   if (length > ((int64_t)doc_len) - vio.ndone) {
     int64_t skip_bytes = length - (doc_len - vio.ndone);
-    iobufferblock_skip(writer_buf, &writer_offset, &length, skip_bytes);
+    iobufferblock_skip(writer_buf.get(), &writer_offset, &length, skip_bytes);
   }
   int64_t bytes = length;
   if (bytes > vio.ntodo())
@@ -505,8 +505,8 @@ CacheVC::openReadFromWriterMain(int /* event ATS_UNUSED */, Event * /*
e ATS_UNU
     // reached the end of the document and the user still wants more
     return calluser(VC_EVENT_EOS);
   }
-  b = iobufferblock_clone(writer_buf, writer_offset, bytes);
-  writer_buf = iobufferblock_skip(writer_buf, &writer_offset, &length, bytes);
+  b = iobufferblock_clone(writer_buf.get(), writer_offset, bytes);
+  writer_buf = iobufferblock_skip(writer_buf.get(), &writer_offset, &length, bytes);
   vio.buffer.writer()->append_block(b);
   vio.ndone += bytes;
   if (vio.ntodo() <= 0)
@@ -938,7 +938,7 @@ CacheVC::openReadVecWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED
*/
     if (io.ok()) {
       ink_assert(f.evac_vector);
       ink_assert(frag_type == CACHE_FRAG_TYPE_HTTP);
-      ink_assert(!buf.m_ptr);
+      ink_assert(!buf);
       f.evac_vector = false;
       last_collision = NULL;
       f.update = 0;
@@ -957,8 +957,9 @@ CacheVC::openReadVecWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED
*/
         // case is rare.
         goto Lrestart;
       }
-    } else
+    } else {
       vol->close_write(this);
+    }
   }
 
   CACHE_INCREMENT_DYN_STAT(cache_read_failure_stat);

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.

Mime
View raw message