trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [1/2] trafficserver git commit: [TS-3130]: Delay setting buffer to NULL to prevent crash in logging
Date Fri, 05 Dec 2014 15:25:54 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/5.2.x 7ae37495c -> ac1655c24


[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/fa6f3da7
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fa6f3da7
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fa6f3da7

Branch: refs/heads/5.2.x
Commit: fa6f3da743ad39746f15eae9d5bb705dfda4f166
Parents: 7ae3749
Author: Sudheer Vinukonda <sudheerv@yahoo-inc.com>
Authored: Tue Nov 25 00:58:37 2014 +0000
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Fri Dec 5 08:11:30 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fa6f3da7/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;
 }
 


Mime
View raw message