You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by sh...@apache.org on 2008/10/02 21:52:18 UTC

svn commit: r701227 - in /incubator/qpid/trunk/qpid/cpp: configure.ac src/qpid/Version.h src/qpid/broker/Broker.cpp src/qpidd.cpp

Author: shuston
Date: Thu Oct  2 12:52:17 2008
New Revision: 701227

URL: http://svn.apache.org/viewvc?rev=701227&view=rev
Log:
Resolve QPID-1309

Added:
    incubator/qpid/trunk/qpid/cpp/src/qpid/Version.h   (with props)
Modified:
    incubator/qpid/trunk/qpid/cpp/configure.ac
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp

Modified: incubator/qpid/trunk/qpid/cpp/configure.ac
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/configure.ac?rev=701227&r1=701226&r2=701227&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/configure.ac (original)
+++ incubator/qpid/trunk/qpid/cpp/configure.ac Thu Oct  2 12:52:17 2008
@@ -7,6 +7,9 @@
 dnl This program is distributed in the hope that it will be useful, but
 dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+dnl
+dnl When updating the name/version number here, also update it in
+dnl src/qpid/Version.h
 
 AC_INIT([qpidc], [0.3], [qpid-dev@incubator.apache.org])
 AC_CONFIG_AUX_DIR([build-aux])

Added: incubator/qpid/trunk/qpid/cpp/src/qpid/Version.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/Version.h?rev=701227&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/Version.h (added)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/Version.h Thu Oct  2 12:52:17 2008
@@ -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*/

Propchange: incubator/qpid/trunk/qpid/cpp/src/qpid/Version.h
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp?rev=701227&r1=701226&r2=701227&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp Thu Oct  2 12:52:17 2008
@@ -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 @@
     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 @@
         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::run() {
     accept();
-	
+
     Dispatcher d(poller);
     int numIOThreads = config.workerThreads;
     std::vector<Thread> t(numIOThreads-1);
@@ -285,7 +286,7 @@
 
     // 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();

Modified: incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp?rev=701227&r1=701226&r2=701227&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpidd.cpp Thu Oct  2 12:52:17 2008
@@ -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 @@
         // 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;