From 7265d88245767960f1b551bb57f8f84942b898d2 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Wed, 17 Dec 2014 08:17:04 +0100 Subject: 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) --- client/main.cpp | 1 + common/resourceaccess.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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[]) QApplication app(argc, argv); new Akonadi2::Console("Akonadi2 Client"); + Akonadi2::Console::main()->log(QString("PID: %1").arg(QCoreApplication::applicationPid())); QCommandLineParser cliOptions; 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 @@ #include "common/handshake_generated.h" #include "common/revisionupdate_generated.h" +#include #include #include #include @@ -180,7 +181,7 @@ void ResourceAccess::connected() log(QString("Connected: %1").arg(d->socket->fullServerName())); { - auto name = d->fbb.CreateString(QString::number((long long)this).toLatin1()); + auto name = d->fbb.CreateString(QString::number(QCoreApplication::applicationPid()).toLatin1()); auto command = Akonadi2::CreateHandshake(d->fbb, name); Akonadi2::FinishHandshakeBuffer(d->fbb, command); Commands::write(d->socket, ++d->messageId, Commands::HandshakeCommand, d->fbb); -- cgit v1.2.3