diff options
| author | Stephen D. Huston <shuston@apache.org> | 2008-10-02 19:52:17 +0000 |
|---|---|---|
| committer | Stephen D. Huston <shuston@apache.org> | 2008-10-02 19:52:17 +0000 |
| commit | f4542688bfe150fad00447f9652c153ece5919de (patch) | |
| tree | bf803a6d034a7980983682c403522755c7b26205 /qpid/cpp/src | |
| parent | 07a09ede55091f2a7b6fc344506b9af714f12425 (diff) | |
| download | qpid-python-f4542688bfe150fad00447f9652c153ece5919de.tar.gz | |
Resolve QPID-1309
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@701227 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rwxr-xr-x | qpid/cpp/src/qpid/Version.h | 40 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/broker/Broker.cpp | 9 | ||||
| -rw-r--r-- | qpid/cpp/src/qpidd.cpp | 5 |
3 files changed, 48 insertions, 6 deletions
diff --git a/qpid/cpp/src/qpid/Version.h b/qpid/cpp/src/qpid/Version.h new file mode 100755 index 0000000000..f046f713e7 --- /dev/null +++ b/qpid/cpp/src/qpid/Version.h @@ -0,0 +1,40 @@ +#ifndef QPID_VERSION_H +#define QPID_VERSION_H + +/* + * + * Copyright (c) 2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include <string> + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +namespace qpid { +#ifdef HAVE_CONFIG_H + const std::string product = PACKAGE_NAME; + const std::string version = PACKAGE_VERSION; + const std::string saslName = BROKER_SASL_NAME; +#else + const std::string product = "qpidc"; + const std::string version = "0.3"; + const std::string saslName = "qpid-broker"; +#endif +} + +#endif /*!QPID_VERSION_H*/ diff --git a/qpid/cpp/src/qpid/broker/Broker.cpp b/qpid/cpp/src/qpid/broker/Broker.cpp index 209599cfdd..8fffebf04b 100644 --- a/qpid/cpp/src/qpid/broker/Broker.cpp +++ b/qpid/cpp/src/qpid/broker/Broker.cpp @@ -47,6 +47,7 @@ #include "qpid/sys/TimeoutHandler.h" #include "qpid/sys/SystemInfo.h" #include "qpid/Url.h" +#include "qpid/Version.h" #include <boost/bind.hpp> @@ -131,7 +132,7 @@ Broker::Broker(const Broker::Options& conf) : config(conf), managementAgentSingleton(!config.enableMgmt), store(0), - acl(0), + acl(0), dataDir(conf.noDataDir ? std::string () : conf.dataDir), links(this), factory(new ConnectionFactory(*this)), @@ -158,7 +159,7 @@ Broker::Broker(const Broker::Options& conf) : mgmtObject->set_connBacklog (conf.connectionBacklog); mgmtObject->set_stagingThreshold (conf.stagingThreshold); mgmtObject->set_mgmtPubInterval (conf.mgmtPubInterval); - mgmtObject->set_version (PACKAGE_VERSION); + mgmtObject->set_version (qpid::version); if (dataDir.isEnabled()) mgmtObject->set_dataDir(dataDir.getPath()); else @@ -274,7 +275,7 @@ void Broker::setStore (MessageStore* _store) void Broker::run() { accept(); - + Dispatcher d(poller); int numIOThreads = config.workerThreads; std::vector<Thread> t(numIOThreads-1); @@ -285,7 +286,7 @@ void Broker::run() { // Run final thread d.run(); - + // Now wait for n-1 io threads to exit for (int i=0; i<numIOThreads-1; ++i) { t[i].join(); diff --git a/qpid/cpp/src/qpidd.cpp b/qpid/cpp/src/qpidd.cpp index 4acfef332a..34d831519e 100644 --- a/qpid/cpp/src/qpidd.cpp +++ b/qpid/cpp/src/qpidd.cpp @@ -26,6 +26,7 @@ #include "qpid/log/Options.h" #include "qpid/log/Logger.h" #include "qpid/Plugin.h" +#include "qpid/Version.h" #include "qpid/sys/Shlib.h" #include "config.h" #include <boost/filesystem/operations.hpp> @@ -206,8 +207,8 @@ int main(int argc, char* argv[]) // Options that just print information. if(options->common.help || options->common.version) { if (options->common.version) - cout << "qpidd (" << PACKAGE_NAME << ") version " - << PACKAGE_VERSION << endl; + cout << "qpidd (" << qpid::product << ") version " + << qpid::version << endl; else if (options->common.help) options->usage(); return 0; |
