[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9
Maximiliano Curia
maxy at moszumanska.debian.org
Mon May 9 09:08:21 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=4a552f6
The following commit has been merged in the master branch:
commit 4a552f6426054eb10763cdef8ba8219b31a1307d
Author: Marcin Ziemiński <zieminn at gmail.com>
Date: Tue Jul 29 15:36:21 2014 +0200
Fixed accountId names.
Signed-off-by: Marcin Ziemiński <zieminn at gmail.com>
---
otr-proxy/KTpProxy/otr-manager.cpp | 8 ++++++--
otr-proxy/KTpProxy/otr-proxy-channel-adaptee.cpp | 11 ++++++++---
otr-proxy/KTpProxy/otr-session.cpp | 4 ++--
otr-proxy/KTpProxy/proxy-service.cpp | 2 +-
4 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/otr-proxy/KTpProxy/otr-manager.cpp b/otr-proxy/KTpProxy/otr-manager.cpp
index cb2b347..d6bb015 100644
--- a/otr-proxy/KTpProxy/otr-manager.cpp
+++ b/otr-proxy/KTpProxy/otr-manager.cpp
@@ -20,6 +20,8 @@
#include "otr-manager.h"
#include "otr-utils.h"
+#include <KDebug>
+
namespace OTR
{
@@ -64,6 +66,7 @@ namespace {
{
Q_UNUSED(accountname);
Q_UNUSED(protocol);
+ kDebug();
Session *session = reinterpret_cast<Session*>(opdata);
session->parent()->createNewPrivateKey(session);
@@ -85,9 +88,10 @@ namespace {
Q_UNUSED(accountname);
Q_UNUSED(protocol);
Q_UNUSED(recipient);
+ kDebug() << "Injecting: " << message;
Message msg;
- msg.setText(QString::fromLocal8Bit(message));
+ msg.setText(QString(message));
msg.setType(Tp::ChannelTextMessageTypeNormal);
msg.setDirection(MessageDirection::TO_PEER);
@@ -319,7 +323,7 @@ namespace {
break;
case OTRL_MSGEVENT_RCVDMSG_GENERAL_ERR:
msg.setOTRheader(QLatin1String("otr-error"), QLatin1String(message));
- msg.setText(QString::fromLatin1("OTR error: %1").arg(QLatin1String(message)));
+ msg.setText(QLatin1String(message));
msg.setDirection(MessageDirection::INTERNAL);
break;
case OTRL_MSGEVENT_RCVDMSG_UNENCRYPTED:
diff --git a/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.cpp b/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.cpp
index 2577749..f871294 100644
--- a/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.cpp
+++ b/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.cpp
@@ -93,6 +93,11 @@ OtrProxyChannel::Adaptee::Adaptee(OtrProxyChannel *pc,
isConnected(false),
otrSes(this, context, manager)
{
+ kDebug() << "Created OTR session for context: "
+ << "Account id: " << context.accountId
+ << " Account name: " << context.accountName
+ << " recipient name: " << context.recipientName
+ << " protocol: " << context.protocol;
connect(chan.data(), SIGNAL(invalidated(Tp::DBusProxy*,const QString&,const QString&)), SIGNAL(closed()));
connect(&otrSes, SIGNAL(trustLevelChanged(TrustLevel)), SLOT(onTrustLevelChanged(TrustLevel)));
connect(&otrSes, SIGNAL(sessionRefreshed()), SIGNAL(sessionRefreshed()));
@@ -130,7 +135,7 @@ QString OtrProxyChannel::Adaptee::localFingerprint() const
QString OtrProxyChannel::Adaptee::remoteFingerprint() const
{
- return QString::fromLatin1("not implemented");
+ return otrSes.remoteFingerprint();
}
Tp::TextChannelPtr OtrProxyChannel::Adaptee::channel() const
@@ -228,7 +233,7 @@ void OtrProxyChannel::Adaptee::sendMessage(const Tp::MessagePartList &message, u
chan->send(otrMessage.parts(), (Tp::MessageSendingFlags) flags),
chan,
context,
- otrMessage.parts(),
+ message,
flags);
connect(pending,
@@ -307,7 +312,7 @@ void OtrProxyChannel::Adaptee::trustFingerprint(const QString& fingerprint, bool
void OtrProxyChannel::Adaptee::onMessageReceived(const Tp::ReceivedMessage &receivedMessage)
{
const uint id = receivedMessage.header()[QLatin1String("pending-message-id")].variant().toUInt(nullptr);
- kDebug() << "Received message: " << receivedMessage.text() << " with id: " << id;
+ kDebug() << "Received message with id: " << id;
OTR::Message otrMsg(receivedMessage.parts());
const OTR::CryptResult cres = otrSes.decrypt(otrMsg);
diff --git a/otr-proxy/KTpProxy/otr-session.cpp b/otr-proxy/KTpProxy/otr-session.cpp
index b9de914..96f4eaf 100644
--- a/otr-proxy/KTpProxy/otr-session.cpp
+++ b/otr-proxy/KTpProxy/otr-session.cpp
@@ -176,7 +176,7 @@ namespace OTR
return CryptResult::ERROR;
} else if(encMessage != nullptr) {
- message.setText(QLatin1String(encMessage));
+ message.setText(QString(encMessage));
message.setType(Tp::ChannelTextMessageTypeNormal);
if(context->active_fingerprint != nullptr) {
const QString hrFingerprint = OTR::utils::humanReadable(context->active_fingerprint->fingerprint);
@@ -219,7 +219,7 @@ namespace OTR
if(!ignore) {
if(decMsg != nullptr) {
- message.setText(QLatin1String(decMsg));
+ message.setText(QString(decMsg));
if(context->active_fingerprint != nullptr) {
const QString hrFingerprint = OTR::utils::humanReadable(context->active_fingerprint->fingerprint);
message.setOTRheader(QLatin1String("otr-remote-fingerprint"), hrFingerprint);
diff --git a/otr-proxy/KTpProxy/proxy-service.cpp b/otr-proxy/KTpProxy/proxy-service.cpp
index 7150fb8..c250826 100644
--- a/otr-proxy/KTpProxy/proxy-service.cpp
+++ b/otr-proxy/KTpProxy/proxy-service.cpp
@@ -124,7 +124,7 @@ void ProxyService::onChannelReady(Tp::PendingOperation *pendingChanReady)
Tp::DBusError error;
OTR::SessionContext ctx =
{
- pendingReady->account->uniqueIdentifier(),
+ pendingReady->account->uniqueIdentifier().replace(QChar('/'), QChar('_')),
pendingReady->account->normalizedName(),
textChannel->targetId(),
textChannel->connection()->protocolName()
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list