trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [01/12] git commit: TS-2091: Return an error from RecGetRecordOrderAndId if the stat isn't registered
Date Tue, 06 Aug 2013 08:48:36 GMT
Updated Branches:
  refs/heads/3.3.x 1bb12edf9 -> e413f12ce


TS-2091: Return an error from RecGetRecordOrderAndId if the stat isn't registered


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

Branch: refs/heads/3.3.x
Commit: ef06341fddb1823c4364e96a534831a68b9310a7
Parents: 994d978
Author: Phil Sorber <sorber@apache.org>
Authored: Sat Aug 3 19:32:27 2013 -0600
Committer: Phil Sorber <sorber@apache.org>
Committed: Sat Aug 3 19:32:27 2013 -0600

----------------------------------------------------------------------
 CHANGES                | 3 +++
 lib/records/RecCore.cc | 2 ++
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ef06341f/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index fd7218c..7d9357a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache Traffic Server 3.3.5
   
 
+  *) [TS-2091] Return an error from RecGetRecordOrderAndId if the stat isn't
+   registered.
+
   *) [TS-2081] Make the WCCP addr configuration LOCAL.
 
   *) [TS-2093] Check bounds on plugin stat creation.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ef06341f/lib/records/RecCore.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecCore.cc b/lib/records/RecCore.cc
index 7c712e9..46208ba 100644
--- a/lib/records/RecCore.cc
+++ b/lib/records/RecCore.cc
@@ -501,6 +501,7 @@ RecGetRecordOrderAndId(const char *name, int* order, int* id, bool lock)
   }
 
   if (ink_hash_table_lookup(g_records_ht, name, (void **) &r)) {
+    if (r->registered) {
     rec_mutex_acquire(&(r->lock));
     if (order)
       *order = r->order;
@@ -508,6 +509,7 @@ RecGetRecordOrderAndId(const char *name, int* order, int* id, bool lock)
       *id = r->rsb_id;
     err = REC_ERR_OKAY;
     rec_mutex_release(&(r->lock));
+    }
   }
 
   if (lock) {


Mime
View raw message