summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Seigo <aseigo@kde.org>2014-12-17 08:17:04 +0100
committerAaron Seigo <aseigo@kde.org>2014-12-17 08:17:04 +0100
commit7265d88245767960f1b551bb57f8f84942b898d2 (patch)
treeb84859a416dd21bc295bdf46fa1897ecd91cfcec
parent77944384d24b5005d6b8648572a31a3ae84dd946 (diff)
downloadsink-7265d88245767960f1b551bb57f8f84942b898d2.tar.gz
sink-7265d88245767960f1b551bb57f8f84942b898d2.zip
use client pid for identifier for now
will allow stateful handling of resource side client-specific caches in future (e.g. for storing the results of source-side search queries)
-rw-r--r--client/main.cpp1
-rw-r--r--common/resourceaccess.cpp3
2 files changed, 3 insertions, 1 deletions
diff --git a/client/main.cpp b/client/main.cpp
index 7449209..61c1c1a 100644
--- a/client/main.cpp
+++ b/client/main.cpp
@@ -29,6 +29,7 @@ int main(int argc, char *argv[])
29 QApplication app(argc, argv); 29 QApplication app(argc, argv);
30 30
31 new Akonadi2::Console("Akonadi2 Client"); 31 new Akonadi2::Console("Akonadi2 Client");
32 Akonadi2::Console::main()->log(QString("PID: %1").arg(QCoreApplication::applicationPid()));
32 33
33 QCommandLineParser cliOptions; 34 QCommandLineParser cliOptions;
34 cliOptions.addPositionalArgument(QObject::tr("[resource]"), 35 cliOptions.addPositionalArgument(QObject::tr("[resource]"),
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp
index 2f7d207..a7e14f5 100644
--- a/common/resourceaccess.cpp
+++ b/common/resourceaccess.cpp
@@ -26,6 +26,7 @@
26#include "common/handshake_generated.h" 26#include "common/handshake_generated.h"
27#include "common/revisionupdate_generated.h" 27#include "common/revisionupdate_generated.h"
28 28
29#include <QCoreApplication>
29#include <QDebug> 30#include <QDebug>
30#include <QDir> 31#include <QDir>
31#include <QProcess> 32#include <QProcess>
@@ -180,7 +181,7 @@ void ResourceAccess::connected()
180 log(QString("Connected: %1").arg(d->socket->fullServerName())); 181 log(QString("Connected: %1").arg(d->socket->fullServerName()));
181 182
182 { 183 {
183 auto name = d->fbb.CreateString(QString::number((long long)this).toLatin1()); 184 auto name = d->fbb.CreateString(QString::number(QCoreApplication::applicationPid()).toLatin1());
184 auto command = Akonadi2::CreateHandshake(d->fbb, name); 185 auto command = Akonadi2::CreateHandshake(d->fbb, name);
185 Akonadi2::FinishHandshakeBuffer(d->fbb, command); 186 Akonadi2::FinishHandshakeBuffer(d->fbb, command);
186 Commands::write(d->socket, ++d->messageId, Commands::HandshakeCommand, d->fbb); 187 Commands::write(d->socket, ++d->messageId, Commands::HandshakeCommand, d->fbb);