You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/12/14 22:51:49 UTC
[40/50] git commit: TS-2424: make g_diags private to RecDebug.cc
TS-2424: make g_diags private to RecDebug.cc
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e510c586
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e510c586
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e510c586
Branch: refs/heads/5.0.x
Commit: e510c586b3ee5121bf162add11ed5188dc70a80f
Parents: 39862b6
Author: James Peach <jp...@apache.org>
Authored: Mon Dec 9 16:15:31 2013 -0800
Committer: James Peach <jp...@apache.org>
Committed: Tue Dec 10 11:22:07 2013 -0800
----------------------------------------------------------------------
cmd/traffic_cop/traffic_cop.cc | 2 --
lib/records/P_RecCore.h | 2 --
lib/records/RecCore.cc | 16 ----------------
lib/records/RecDebug.cc | 15 +++++++++++++++
4 files changed, 15 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e510c586/cmd/traffic_cop/traffic_cop.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_cop/traffic_cop.cc b/cmd/traffic_cop/traffic_cop.cc
index 564f070..21ea7d1 100644
--- a/cmd/traffic_cop/traffic_cop.cc
+++ b/cmd/traffic_cop/traffic_cop.cc
@@ -61,8 +61,6 @@ static const char COP_TRACE_FILE[] = "/tmp/traffic_cop.trace";
#define COP_WARNING LOG_ERR
#define COP_DEBUG LOG_DEBUG
-Diags * g_diags; // link time dependency
-
static const char *root_dir;
static const char *runtime_dir;
static const char *config_dir;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e510c586/lib/records/P_RecCore.h
----------------------------------------------------------------------
diff --git a/lib/records/P_RecCore.h b/lib/records/P_RecCore.h
index 2d92f81..375f526 100644
--- a/lib/records/P_RecCore.h
+++ b/lib/records/P_RecCore.h
@@ -43,8 +43,6 @@ extern int g_num_update[];
extern RecModeT g_mode_type;
extern RecTree *g_records_tree;
-extern Diags *g_diags;
-
// records.config items
extern const char *g_rec_config_fpath;
extern LLQ *g_rec_config_contents_llq;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e510c586/lib/records/RecCore.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecCore.cc b/lib/records/RecCore.cc
index 96cddfc..759dcef 100644
--- a/lib/records/RecCore.cc
+++ b/lib/records/RecCore.cc
@@ -31,8 +31,6 @@
static bool g_initialized = false;
-Diags *g_diags = NULL;
-
RecRecord *g_records = NULL;
InkHashTable *g_records_ht = NULL;
ink_rwlock g_records_rwlock;
@@ -216,20 +214,6 @@ RecCoreInit(RecModeT mode_type, Diags *_diags)
return REC_ERR_OKAY;
}
-
-//-------------------------------------------------------------------------
-// RecSetDiags
-//-------------------------------------------------------------------------
-int
-RecSetDiags(Diags * _diags)
-{
- // Warning! It's very dangerous to change diags on the fly! This
- // function only exists so that we can boot-strap TM on startup.
- ink_atomic_swap(&g_diags, _diags);
- return REC_ERR_OKAY;
-}
-
-
//-------------------------------------------------------------------------
// RecLinkCnfigXXX
//-------------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e510c586/lib/records/RecDebug.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecDebug.cc b/lib/records/RecDebug.cc
index ec7f5da..836ff23 100644
--- a/lib/records/RecDebug.cc
+++ b/lib/records/RecDebug.cc
@@ -24,6 +24,21 @@
#include "P_RecUtils.h"
#include "P_RecCore.h"
+static Diags *g_diags = NULL;
+
+//-------------------------------------------------------------------------
+// RecSetDiags
+//-------------------------------------------------------------------------
+int
+RecSetDiags(Diags * _diags)
+{
+ // Warning! It's very dangerous to change diags on the fly! This
+ // function only exists so that we can boot-strap TM on startup.
+ ink_atomic_swap(&g_diags, _diags);
+ return REC_ERR_OKAY;
+}
+
+
//-------------------------------------------------------------------------
// RecLog
//-------------------------------------------------------------------------