qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1156262 - in /qpid/trunk/qpid/cpp/src: CMakeLists.txt Makefile.am qpid/client/amqp0_10/ConnectionImpl.cpp qpid/client/amqp0_10/SimpleUrlParser.cpp qpid/client/amqp0_10/SimpleUrlParser.h
Date Wed, 10 Aug 2011 17:01:56 GMT
Author: gsim
Date: Wed Aug 10 17:01:55 2011
New Revision: 1156262

URL: http://svn.apache.org/viewvc?rev=1156262&view=rev
Log:
NO-JIRA: Remove redundant code (qpid::Url now does everything required)

Removed:
    qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/SimpleUrlParser.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/SimpleUrlParser.h
Modified:
    qpid/trunk/qpid/cpp/src/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/Makefile.am
    qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=1156262&r1=1156261&r2=1156262&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Wed Aug 10 17:01:55 2011
@@ -923,8 +923,6 @@ set (qpidmessaging_SOURCES
      qpid/client/amqp0_10/SessionImpl.cpp
      qpid/client/amqp0_10/SenderImpl.h
      qpid/client/amqp0_10/SenderImpl.cpp
-     qpid/client/amqp0_10/SimpleUrlParser.h
-     qpid/client/amqp0_10/SimpleUrlParser.cpp
 )
 add_msvc_version (qpidmessaging library dll)
 

Modified: qpid/trunk/qpid/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/Makefile.am?rev=1156262&r1=1156261&r2=1156262&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/src/Makefile.am Wed Aug 10 17:01:55 2011
@@ -789,9 +789,7 @@ libqpidmessaging_la_SOURCES =			\
   qpid/client/amqp0_10/SessionImpl.h		\
   qpid/client/amqp0_10/SessionImpl.cpp		\
   qpid/client/amqp0_10/SenderImpl.h		\
-  qpid/client/amqp0_10/SenderImpl.cpp           \
-  qpid/client/amqp0_10/SimpleUrlParser.h	\
-  qpid/client/amqp0_10/SimpleUrlParser.cpp
+  qpid/client/amqp0_10/SenderImpl.cpp
 
 QPIDMESSAGING_VERSION_INFO  = 2:0:0
 libqpidmessaging_la_LDFLAGS = -version-info $(QPIDMESSAGING_VERSION_INFO)

Modified: qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp?rev=1156262&r1=1156261&r2=1156262&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp Wed Aug 10 17:01:55 2011
@@ -20,7 +20,6 @@
  */
 #include "ConnectionImpl.h"
 #include "SessionImpl.h"
-#include "SimpleUrlParser.h"
 #include "qpid/messaging/exceptions.h"
 #include "qpid/messaging/Session.h"
 #include "qpid/messaging/PrivateImplRef.h"
@@ -273,14 +272,10 @@ bool ConnectionImpl::tryConnect()
     for (std::vector<std::string>::const_iterator i = urls.begin(); i != urls.end();
++i) {
         try {
             QPID_LOG(info, "Trying to connect to " << *i << "...");
-            //TODO: when url support is more complete can avoid this test here
-            if (i->find("amqp:") == 0) {
-                Url url(*i);
-                connection.open(url, settings);
-            } else {
-                SimpleUrlParser::parse(*i, settings);
-                connection.open(settings);
-            }
+            Url url(*i);
+            if (url.getUser().size()) settings.username = url.getUser();
+            if (url.getPass().size()) settings.password = url.getPass();
+            connection.open(url, settings);
             QPID_LOG(info, "Connected to " << *i);
             mergeUrls(connection.getInitialBrokers(), l);
             return resetSessions(l);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message