qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject svn commit: r1329236 - in /qpid/trunk/qpid/cpp: include/qpid/ src/ src/posix/ src/qpid/ src/qpid/client/ src/windows/
Date Mon, 23 Apr 2012 13:44:12 GMT
Author: tross
Date: Mon Apr 23 13:44:11 2012
New Revision: 1329236

URL: http://svn.apache.org/viewvc?rev=1329236&view=rev
Log:
QPID-3510 - Created a separate option in CommonOptions for the client configuration file.

Modified:
    qpid/trunk/qpid/cpp/include/qpid/Options.h
    qpid/trunk/qpid/cpp/src/Makefile.am
    qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp
    qpid/trunk/qpid/cpp/src/qpid/Options.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/SslConnector.cpp
    qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp

Modified: qpid/trunk/qpid/cpp/include/qpid/Options.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qpid/Options.h?rev=1329236&r1=1329235&r2=1329236&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/include/qpid/Options.h (original)
+++ qpid/trunk/qpid/cpp/include/qpid/Options.h Mon Apr 23 13:44:11 2012
@@ -163,10 +163,12 @@ struct Options : public po::options_desc
  */
 struct CommonOptions : public Options {
     QPID_COMMON_EXTERN CommonOptions(const std::string& name=std::string(),
-                  const std::string& configfile=std::string());
+                                     const std::string& configfile=std::string(),
+                                     const std::string& clientConfigFile=std::string());
     bool help;
     bool version;
     std::string config;
+    std::string clientConfig;
 };
 
 

Modified: qpid/trunk/qpid/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/Makefile.am?rev=1329236&r1=1329235&r2=1329236&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/src/Makefile.am Mon Apr 23 13:44:11 2012
@@ -140,7 +140,7 @@ tmoduleexec_LTLIBRARIES=
 AM_CXXFLAGS += -DBOOST_FILESYSTEM_VERSION=2
 
 ## Automake macros to build libraries and executables.
-qpidd_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDD_MODULE_DIR=\"$(dmoduleexecdir)\" -DQPIDD_CONF_FILE=\"$(sysconfdir)/qpidd.conf\"
+qpidd_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDD_MODULE_DIR=\"$(dmoduleexecdir)\" -DQPIDD_CONF_FILE=\"$(sysconfdir)/qpidd.conf\"
-DQPIDC_CONF_FILE=\"$(confdir)/qpidc.conf\"
 libqpidclient_la_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDC_MODULE_DIR=\"$(cmoduleexecdir)\" -DQPIDC_CONF_FILE=\"$(confdir)/qpidc.conf\"
 
 qpidd_LDADD =					\

Modified: qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp?rev=1329236&r1=1329235&r2=1329236&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp Mon Apr 23 13:44:11 2012
@@ -39,7 +39,7 @@ namespace broker {
 
 BootstrapOptions::BootstrapOptions(const char* argv0)
   : qpid::Options("Options"),
-    common("", QPIDD_CONF_FILE),
+    common("", QPIDD_CONF_FILE, QPIDC_CONF_FILE),
     module(QPIDD_MODULE_DIR),
     log(argv0)
 {
@@ -91,7 +91,7 @@ struct QpiddPosixOptions : public QpiddO
 
 QpiddOptions::QpiddOptions(const char* argv0)
   : qpid::Options("Options"),
-    common("", QPIDD_CONF_FILE),
+    common("", QPIDD_CONF_FILE, QPIDC_CONF_FILE),
     module(QPIDD_MODULE_DIR),
     log(argv0)
 {

Modified: qpid/trunk/qpid/cpp/src/qpid/Options.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/Options.cpp?rev=1329236&r1=1329235&r2=1329236&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/Options.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/Options.cpp Mon Apr 23 13:44:11 2012
@@ -186,13 +186,14 @@ void Options::parse(int argc, char const
     }
 }
 
-CommonOptions::CommonOptions(const string& name, const string& configfile)
-    : Options(name), config(configfile)
+CommonOptions::CommonOptions(const string& name, const string& configfile, const
string& clientfile)
+    : Options(name), config(configfile), clientConfig(clientfile)
 {
     addOptions()
         ("help,h", optValue(help), "Displays the help message")
         ("version,v", optValue(version), "Displays version information")
-        ("config", optValue(config, "FILE"), "Reads configuration from FILE");
+        ("config", optValue(config, "FILE"), "Reads configuration from FILE")
+        ("client-config", optValue(clientConfig, "FILE"), "Reads client configuration from
FILE (for cluster interconnect)");
 }
 
 

Modified: qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp?rev=1329236&r1=1329235&r2=1329236&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp Mon Apr 23 13:44:11 2012
@@ -115,10 +115,10 @@ public:
         ioThreads(0),
         connections(0)
     {
-        CommonOptions common("", QPIDC_CONF_FILE);
+        CommonOptions common("", "", QPIDC_CONF_FILE);
         IOThreadOptions options(c);
-        common.parse(0, 0, common.config, true);
-        options.parse(0, 0, common.config, true);
+        common.parse(0, 0, common.clientConfig, true);
+        options.parse(0, 0, common.clientConfig, true);
         maxIOThreads = (options.maxIOThreads != -1) ?
             options.maxIOThreads : 1;
     }

Modified: qpid/trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp?rev=1329236&r1=1329235&r2=1329236&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp Mon Apr 23 13:44:11 2012
@@ -39,11 +39,11 @@ namespace {
 
 struct LoadtimeInitialise {
     LoadtimeInitialise() {
-        CommonOptions common("", QPIDC_CONF_FILE);
+        CommonOptions common("", "", QPIDC_CONF_FILE);
         qpid::ModuleOptions moduleOptions(QPIDC_MODULE_DIR);
         string              defaultPath (moduleOptions.loadDir);
-        common.parse(0, 0, common.config, true);
-        moduleOptions.parse (0, 0, common.config, true);
+        common.parse(0, 0, common.clientConfig, true);
+        moduleOptions.parse (0, 0, common.clientConfig, true);
 
         for (vector<string>::iterator iter = moduleOptions.load.begin();
              iter != moduleOptions.load.end();

Modified: qpid/trunk/qpid/cpp/src/qpid/client/SslConnector.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/SslConnector.cpp?rev=1329236&r1=1329235&r2=1329236&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/SslConnector.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/SslConnector.cpp Mon Apr 23 13:44:11 2012
@@ -148,10 +148,10 @@ namespace {
     struct StaticInit {
         StaticInit() {
             try {
-                CommonOptions common("", QPIDC_CONF_FILE);
+                CommonOptions common("", "", QPIDC_CONF_FILE);
                 SslOptions options;
-                common.parse(0, 0, common.config, true);
-                options.parse (0, 0, common.config, true);
+                common.parse(0, 0, common.clientConfig, true);
+                options.parse (0, 0, common.clientConfig, true);
                 if (options.certDbPath.empty()) {
                     QPID_LOG(info, "SSL connector not enabled, you must set QPID_SSL_CERT_DB
to enable it.");
                 } else {

Modified: qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp?rev=1329236&r1=1329235&r2=1329236&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp Mon Apr 23 13:44:11 2012
@@ -37,7 +37,7 @@ namespace broker {
 
 BootstrapOptions::BootstrapOptions(const char* argv0)
   : qpid::Options("Options"),
-    common("", QPIDD_CONF_FILE),
+    common("", QPIDD_CONF_FILE, QPIDC_CONF_FILE),
     module(QPIDD_MODULE_DIR),
     log(argv0)
 {
@@ -315,7 +315,7 @@ struct QpiddWindowsOptions : public Qpid
 
 QpiddOptions::QpiddOptions(const char* argv0)
   : qpid::Options("Options"),
-    common("", QPIDD_CONF_FILE),
+    common("", QPIDD_CONF_FILE, QPIDC_CONF_FILE),
     module(QPIDD_MODULE_DIR),
     log(argv0)
 {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message