Commit 4d76090f authored by George Kiagiadakis's avatar George Kiagiadakis

Make the channel ready before using it.

svn path=/trunk/KDE/kdenetwork/krdc/; revision=1195299
parent 4b1d0c61
......@@ -62,6 +62,24 @@ void Approver::onDispatchOperationReady(Tp::PendingOperation *op)
kDebug() << "DispatchOp ready!";
Tp::ChannelPtr channel = m_dispatchOp->channels()[0];
connect(channel->becomeReady(),
SIGNAL(finished(Tp::PendingOperation*)),
SLOT(onChannelReady(Tp::PendingOperation*)));
}
void Approver::onChannelReady(Tp::PendingOperation *op)
{
if (op->isError()) {
kError() << "Channel failed to become ready"
<< op->errorName() << op->errorMessage();
m_context->setFinishedWithError(op->errorName(), op->errorMessage());
emit finished();
return;
}
kDebug() << "Channel ready!";
Tp::ContactPtr contact = m_dispatchOp->channels()[0]->initiatorContact();
KNotification *notification = new KNotification("newrfb", NULL, KNotification::Persistent);
......
......@@ -43,6 +43,7 @@ private Q_SLOTS:
void onAccepted();
void onRejected();
void onDispatchOperationReady(Tp::PendingOperation*);
void onChannelReady(Tp::PendingOperation*);
void onClaimFinished(Tp::PendingOperation*);
Q_SIGNALS:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment