You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2012/09/09 22:10:08 UTC

git commit: TS-1339: Disabled fragment offset storage for non-HTTP data.

Updated Branches:
  refs/heads/master dc7f57327 -> e2bfe1a87


TS-1339: Disabled fragment offset storage for non-HTTP data.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e2bfe1a8
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e2bfe1a8
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e2bfe1a8

Branch: refs/heads/master
Commit: e2bfe1a872fe94f566a5fc3a89aa3dcb98195c08
Parents: dc7f573
Author: Alan M. Carroll <am...@network-geographics.com>
Authored: Sun Sep 9 15:06:40 2012 -0500
Committer: Alan M. Carroll <am...@network-geographics.com>
Committed: Sun Sep 9 15:09:36 2012 -0500

----------------------------------------------------------------------
 iocore/cache/CacheWrite.cc |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e2bfe1a8/iocore/cache/CacheWrite.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index 86494bb..841b20d 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -1233,7 +1233,10 @@ CacheVC::openWriteCloseDataDone(int event, Event *e)
       ink_assert(key == earliest_key);
       earliest_dir = dir;
     } else {
-      alternate.push_frag_offset(write_pos);
+      // Store the offset only if there is a table.
+      // Currently there is no alt (and thence no table) for non-HTTP.
+      if (alternate.valid())
+        alternate.push_frag_offset(write_pos);
     }
     fragment++;
     write_pos += write_len;
@@ -1324,7 +1327,10 @@ CacheVC::openWriteWriteDone(int event, Event *e)
       ink_assert(key == earliest_key);
       earliest_dir = dir;
     } else {
-      alternate.push_frag_offset(write_pos);
+      // Store the offset only if there is a table.
+      // Currently there is no alt (and thence no table) for non-HTTP.
+      if (alternate.valid())
+        alternate.push_frag_offset(write_pos);
     }
     ++fragment;
     write_pos += write_len;