You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by mg...@apache.org on 2011/04/06 06:39:40 UTC

svn commit: r1089294 - /qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp

Author: mgoulish
Date: Wed Apr  6 04:39:40 2011
New Revision: 1089294

URL: http://svn.apache.org/viewvc?rev=1089294&view=rev
Log:
gsim's patch to bring c++ logic in line with other clients.

If there is no username, then do nothing with either NAME or PASSWD callbacks.
If there is a name but no passwd, then explicitly store an empty PASSWD callback.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp?rev=1089294&r1=1089293&r2=1089294&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/SaslFactory.cpp Wed Apr  6 04:39:40 2011
@@ -182,17 +182,18 @@ CyrusSasl::CyrusSasl(const std::string &
         callbacks[i].id = SASL_CB_AUTHNAME;
         callbacks[i].proc = (CallbackProc*) &getUserFromSettings;
         callbacks[i++].context = &settings;
-    }
 
-    callbacks[i].id = SASL_CB_PASS;
-    if (settings.password.empty()) {
-        callbacks[i].proc = 0;
-        callbacks[i++].context = 0;        
-    } else {
-        callbacks[i].proc = (CallbackProc*) &getPasswordFromSettings;
-        callbacks[i++].context = &settings;
+        callbacks[i].id = SASL_CB_PASS;
+        if (settings.password.empty()) {
+            callbacks[i].proc = 0;
+            callbacks[i++].context = 0;        
+        } else {
+            callbacks[i].proc = (CallbackProc*) &getPasswordFromSettings;
+            callbacks[i++].context = &settings;
+        }
     }
 
+
     callbacks[i].id = SASL_CB_LIST_END;
     callbacks[i].proc = 0;
     callbacks[i++].context = 0;



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