You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2016/05/11 20:31:47 UTC
[trafficserver] 23/33: TS-4425: Switch CacheWrite.cc over to
Ptr::get().
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 5df323ea1f320fd360cdd08dd3eb0c2e5d615a17
Author: James Peach <jp...@apache.org>
AuthorDate: Fri May 6 18:57:31 2016 -0700
TS-4425: Switch CacheWrite.cc over to Ptr::get().
---
iocore/cache/CacheWrite.cc | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index cd56a5b..af69c07 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -224,7 +224,7 @@ iobufferblock_memcpy(char *p, int len, IOBufferBlock *ab, int offset)
max_bytes -= offset;
if (max_bytes <= 0) {
offset = -max_bytes;
- b = b->next;
+ b = b->next.get();
continue;
}
int bytes = len;
@@ -233,7 +233,7 @@ iobufferblock_memcpy(char *p, int len, IOBufferBlock *ab, int offset)
::memcpy(p, start + offset, bytes);
p += bytes;
len -= bytes;
- b = b->next;
+ b = b->next.get();
offset = 0;
}
return p;
@@ -811,7 +811,7 @@ agg_copy(char *p, CacheVC *vc)
iobufferblock_memcpy(doc->data(), vc->write_len, res_alt_blk, 0);
else
#endif
- iobufferblock_memcpy(doc->data(), vc->write_len, vc->blocks, vc->offset);
+ iobufferblock_memcpy(doc->data(), vc->write_len, vc->blocks.get(), vc->offset);
#ifdef VERIFY_JTEST_DATA
if (f.use_first_key && header_len) {
int ib = 0, xd = 0;
@@ -1218,7 +1218,7 @@ CacheVC::openWriteCloseDataDone(int event, Event *e)
fragment++;
write_pos += write_len;
dir_insert(&key, vol, &dir);
- blocks = iobufferblock_skip(blocks, &offset, &length, write_len);
+ blocks = iobufferblock_skip(blocks.get(), &offset, &length, write_len);
next_CacheKey(&key, &key);
if (length) {
write_len = length;
@@ -1315,7 +1315,7 @@ CacheVC::openWriteWriteDone(int event, Event *e)
write_pos += write_len;
dir_insert(&key, vol, &dir);
DDebug("cache_insert", "WriteDone: %X, %X, %d", key.slice32(0), first_key.slice32(0), write_len);
- blocks = iobufferblock_skip(blocks, &offset, &length, write_len);
+ blocks = iobufferblock_skip(blocks.get(), &offset, &length, write_len);
next_CacheKey(&key, &key);
}
if (closed)
@@ -1480,7 +1480,7 @@ CacheVC::openWriteStartDone(int event, Event *e)
if (!(doc->first_key == first_key))
goto Lcollision;
- if (doc->magic != DOC_MAGIC || !doc->hlen || this->load_http_info(write_vector, doc, buf) != doc->hlen) {
+ if (doc->magic != DOC_MAGIC || !doc->hlen || this->load_http_info(write_vector, doc, buf.object()) != doc->hlen) {
err = ECACHE_BAD_META_DATA;
goto Lfailure;
}
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.