Browse Source

[1595] Use upper case for constants

Michal 'vorner' Vaner 13 years ago
parent
commit
959f4cebed

+ 1 - 1
src/bin/auth/common.cc

@@ -38,4 +38,4 @@ getXfroutSocketPath() {
     }
 }
 
-const char* auth_name = "b10-auth";
+const char* const AUTH_NAME = "b10-auth";

+ 1 - 1
src/bin/auth/common.h

@@ -41,7 +41,7 @@ std::string getXfroutSocketPath();
 /// \brief The name used when identifieng the process
 ///
 /// This is currently b10-auth, but it can be changed easily in one place.
-extern const char* auth_name;
+extern const char* const AUTH_NAME;
 
 #endif // __COMMON_H
 

+ 2 - 2
src/bin/auth/main.cc

@@ -116,7 +116,7 @@ main(int argc, char* argv[]) {
     }
 
     // Initialize logging.  If verbose, we'll use maximum verbosity.
-    isc::log::initLogger(auth_name,
+    isc::log::initLogger(AUTH_NAME,
                          (verbose ? isc::log::DEBUG : isc::log::INFO),
                          isc::log::MAX_DEBUG_LEVEL, NULL);
 
@@ -154,7 +154,7 @@ main(int argc, char* argv[]) {
         cc_session = new Session(io_service.get_io_service());
         LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_CONFIG_CHANNEL_CREATED);
         // Initialize the Socket Requestor
-        isc::server_common::initSocketRequestor(*cc_session, auth_name);
+        isc::server_common::initSocketRequestor(*cc_session, AUTH_NAME);
 
         // We delay starting listening to new commands/config just before we
         // go into the main loop to avoid confusion due to mixture of

+ 1 - 1
src/bin/resolver/common.cc

@@ -14,4 +14,4 @@
 
 #include "common.h"
 
-const char* resolver_name = "b10-resolver";
+const char* const RESOLVER_NAME = "b10-resolver";

+ 1 - 1
src/bin/resolver/common.h

@@ -18,6 +18,6 @@
 /// \brief The name used to identify the resolver between modules.
 ///
 /// It is currently set to b10-resolver.
-extern const char* resolver_name;
+extern const char* const RESOLVER_NAME;
 
 #endif

+ 2 - 2
src/bin/resolver/main.cc

@@ -122,7 +122,7 @@ main(int argc, char* argv[]) {
 
     // Until proper logging comes along, initialize the logging with the
     // temporary initLogger() code.  If verbose, we'll use maximum verbosity.
-    isc::log::initLogger(resolver_name,
+    isc::log::initLogger(RESOLVER_NAME,
                          (verbose ? isc::log::DEBUG : isc::log::INFO),
                          isc::log::MAX_DEBUG_LEVEL, NULL);
 
@@ -203,7 +203,7 @@ main(int argc, char* argv[]) {
         LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_SERVICE_CREATED);
 
         cc_session = new Session(io_service.get_io_service());
-        isc::server_common::initSocketRequestor(*cc_session, resolver_name);
+        isc::server_common::initSocketRequestor(*cc_session, RESOLVER_NAME);
 
         // We delay starting listening to new commands/config just before we
         // go into the main loop.   See auth/main.cc for the rationale.