Hello community,

here is the log from the commit of package ktp-auth-handler for 
openSUSE:Factory checked in at 2015-10-24 10:27:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ktp-auth-handler (Old)
 and      /work/SRC/openSUSE:Factory/.ktp-auth-handler.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ktp-auth-handler"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ktp-auth-handler/ktp-auth-handler.changes        
2015-10-03 20:24:26.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ktp-auth-handler.new/ktp-auth-handler.changes   
2015-10-24 10:28:09.000000000 +0200
@@ -1,0 +2,8 @@
+Sun Oct 11 13:41:20 UTC 2015 - [email protected]
+
+- Update to KDE Applications 15.08.2
+   * KDE Applications 15.08.2 
+   * https://www.kde.org/announcements/announce-applications-15.08.2.php
+
+
+-------------------------------------------------------------------

Old:
----
  ktp-auth-handler-15.08.1.tar.xz

New:
----
  ktp-auth-handler-15.08.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ktp-auth-handler.spec ++++++
--- /var/tmp/diff_new_pack.wRPOet/_old  2015-10-24 10:28:10.000000000 +0200
+++ /var/tmp/diff_new_pack.wRPOet/_new  2015-10-24 10:28:10.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           ktp-auth-handler
-Version:        15.08.1
+Version:        15.08.2
 Release:        0
 Summary:        Telepathy auth handler
 License:        LGPL-2.1+

++++++ ktp-auth-handler-15.08.1.tar.xz -> ktp-auth-handler-15.08.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ktp-auth-handler-15.08.1/CMakeLists.txt 
new/ktp-auth-handler-15.08.2/CMakeLists.txt
--- old/ktp-auth-handler-15.08.1/CMakeLists.txt 2015-09-10 00:57:06.000000000 
+0200
+++ new/ktp-auth-handler-15.08.2/CMakeLists.txt 2015-10-09 02:05:26.000000000 
+0200
@@ -3,7 +3,7 @@
 # KDE Application Version, managed by release script
 set(KDE_APPLICATIONS_VERSION_MAJOR "15")
 set(KDE_APPLICATIONS_VERSION_MINOR "08")
-set(KDE_APPLICATIONS_VERSION_MICRO "1")
+set(KDE_APPLICATIONS_VERSION_MICRO "2")
 set(KTP_AUTH_HANDLER_VERSION 
"${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
 
 cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ktp-auth-handler-15.08.1/sasl-auth-op.cpp 
new/ktp-auth-handler-15.08.2/sasl-auth-op.cpp
--- old/ktp-auth-handler-15.08.1/sasl-auth-op.cpp       2015-09-10 
00:57:06.000000000 +0200
+++ new/ktp-auth-handler-15.08.2/sasl-auth-op.cpp       2015-10-09 
02:05:26.000000000 +0200
@@ -52,41 +52,45 @@
 
 void SaslAuthOp::gotProperties(Tp::PendingOperation *op)
 {
-    if (op->isError()) {
-        qWarning() << "Unable to retrieve available SASL mechanisms";
-        m_channel->requestClose();
-        setFinishedWithError(op->errorName(), op->errorMessage());
-        return;
+    if (m_mechanisms.isEmpty()) {
+        if (op->isError()) {
+            qWarning() << "Unable to retrieve available SASL mechanisms";
+            m_channel->requestClose();
+            setFinishedWithError(op->errorName(), op->errorMessage());
+            return;
+        }
+
+        Tp::PendingVariantMap *pvm = qobject_cast<Tp::PendingVariantMap*>(op);
+        m_properties = qdbus_cast<QVariantMap>(pvm->result());
+        m_mechanisms = 
qdbus_cast<QStringList>(m_properties.value(QLatin1String("AvailableMechanisms")));
+        qDebug() << m_mechanisms;
     }
 
-    Tp::PendingVariantMap *pvm = qobject_cast<Tp::PendingVariantMap*>(op);
-    QVariantMap props = qdbus_cast<QVariantMap>(pvm->result());
-    QStringList mechanisms = 
qdbus_cast<QStringList>(props.value(QLatin1String("AvailableMechanisms")));
-    qDebug() << mechanisms;
-
-    uint status = qdbus_cast<uint>(props.value(QLatin1String("SASLStatus")));
-    QString error = 
qdbus_cast<QString>(props.value(QLatin1String("SASLError")));
-    QVariantMap errorDetails = 
qdbus_cast<QVariantMap>(props.value(QLatin1String("SASLErrorDetails")));
+    uint status = 
qdbus_cast<uint>(m_properties.value(QLatin1String("SASLStatus")));
+    QString error = 
qdbus_cast<QString>(m_properties.value(QLatin1String("SASLError")));
+    QVariantMap errorDetails = 
qdbus_cast<QVariantMap>(m_properties.value(QLatin1String("SASLErrorDetails")));
 
-    if (mechanisms.contains(QLatin1String("X-OAUTH2"))) {
+    if (m_mechanisms.contains(QLatin1String("X-OAUTH2"))) {
         qDebug() << "Starting X-OAuth2 auth";
+        m_mechanisms.removeAll(QStringLiteral("X-OAUTH2"));
         XTelepathySSOGoogleOperation *authop = new 
XTelepathySSOGoogleOperation(m_account, m_accountStorageId, m_saslIface);
         connect(authop,
                 SIGNAL(finished(Tp::PendingOperation*)),
                 SLOT(onAuthOperationFinished(Tp::PendingOperation*)));
 
         authop->onSASLStatusChanged(status, error, errorDetails);
-    } else if (mechanisms.contains(QLatin1String("X-TELEPATHY-PASSWORD"))) {
+    } else if (m_mechanisms.contains(QLatin1String("X-TELEPATHY-PASSWORD"))) {
         qDebug() << "Starting Password auth";
+        m_mechanisms.removeAll(QStringLiteral("X-TELEPATHY-PASSWORD"));
         Q_EMIT ready(this);
-        XTelepathyPasswordAuthOperation *authop = new 
XTelepathyPasswordAuthOperation(m_account, m_accountStorageId, m_saslIface, 
qdbus_cast<bool>(props.value(QLatin1String("CanTryAgain"))));
+        XTelepathyPasswordAuthOperation *authop = new 
XTelepathyPasswordAuthOperation(m_account, m_accountStorageId, m_saslIface, 
qdbus_cast<bool>(m_properties.value(QLatin1String("CanTryAgain"))));
         connect(authop,
                 SIGNAL(finished(Tp::PendingOperation*)),
                 SLOT(onAuthOperationFinished(Tp::PendingOperation*)));
 
         authop->onSASLStatusChanged(status, error, errorDetails);
     } else {
-        qWarning() << "X-TELEPATHY-PASSWORD, X-OAUTH2 are the only supported 
SASL mechanism and are not available:" << mechanisms;
+        qWarning() << "X-TELEPATHY-PASSWORD, X-OAUTH2 are the only supported 
SASL mechanism and are not available:" << m_mechanisms;
         m_channel->requestClose();
         setFinishedWithError(TP_QT_ERROR_NOT_IMPLEMENTED,
                 QLatin1String("X-TELEPATHY-PASSWORD, X-OAUTH2 are the only 
supported SASL mechanism and are not available:"));
@@ -96,11 +100,17 @@
 
 void SaslAuthOp::onAuthOperationFinished(Tp::PendingOperation *op)
 {
-    m_channel->requestClose();
     if (op->isError()) {
-        setFinishedWithError(op->errorName(), op->errorMessage());
+        if (!m_mechanisms.isEmpty()) {
+            // if we have other mechanisms left, try again with different one
+            gotProperties(0);
+        } else {
+            setFinishedWithError(op->errorName(), op->errorMessage());
+            m_channel->requestClose();
+        }
     } else {
         setFinished();
+        m_channel->requestClose();
     }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ktp-auth-handler-15.08.1/sasl-auth-op.h 
new/ktp-auth-handler-15.08.2/sasl-auth-op.h
--- old/ktp-auth-handler-15.08.1/sasl-auth-op.h 2015-09-10 00:57:06.000000000 
+0200
+++ new/ktp-auth-handler-15.08.2/sasl-auth-op.h 2015-10-09 02:05:26.000000000 
+0200
@@ -53,6 +53,8 @@
     Tp::ChannelPtr m_channel;
     Tp::Client::ChannelInterfaceSASLAuthenticationInterface *m_saslIface;
     int m_accountStorageId;
+    QStringList m_mechanisms;
+    QVariantMap m_properties;
 };
 
 #endif // SASL_AUTH_OP_H


Reply via email to