Repository: trafficserver
Updated Branches:
  refs/heads/master 57939d166 -> 54ade19da


[TS-3130]: Delay setting buffer to NULL to prevent crash in logging


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

Branch: refs/heads/master
Commit: 54ade19da2c3387a7a19885a8bef8d3ff1ede6f0
Parents: 57939d1
Author: Sudheer Vinukonda <[email protected]>
Authored: Tue Nov 25 00:58:37 2014 +0000
Committer: Sudheer Vinukonda <[email protected]>
Committed: Tue Nov 25 00:58:37 2014 +0000

----------------------------------------------------------------------
 proxy/logging/LogObject.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/54ade19d/proxy/logging/LogObject.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc
index f8d829b..cd1c108 100644
--- a/proxy/logging/LogObject.cc
+++ b/proxy/logging/LogObject.cc
@@ -476,7 +476,6 @@ LogObject::_checkout_write(size_t * write_offset, size_t 
bytes_needed) {
       // transaction cannot be logged
       //
       retry = false;
-      buffer = NULL;
       break;
 
     default:
@@ -503,7 +502,9 @@ LogObject::_checkout_write(size_t * write_offset, size_t 
bytes_needed) {
   // not retry because we really do
   // not want to write to the buffer
   // only to set it as full
-
+  if (result_code == LogBuffer::LB_BUFFER_TOO_SMALL) {
+    buffer = NULL;
+  }
   return buffer;
 }
 

Reply via email to