summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusconnection_p.h
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@jollamobile.com>2013-12-20 19:34:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-30 23:20:40 +0100
commit82edcd4e12d2652d63ec0732d8053b2761562d3d (patch)
treeabbd55eae67453b1307dda2adaabaf266cb79a0c /src/dbus/qdbusconnection_p.h
parent56d141ae6bd3fbb6b100307a7a251e2026147f60 (diff)
Don't leak pending call objects when peer disconnects
Unlike in regular connection to DBus server, we don't get pending call notifies when a peer drops the connection in peer-to-peer mode. Thus, we need to keep track of pending calls in such cases and get rid of them in ~QDBusConnectionPrivate(). Change-Id: I83e20db0bc7b2ebf509c7fdb1382ffc7d0ede9d3 Done-with: Kalle Vahlman <kalle.vahlman@movial.com> Reviewed-by: Daniele E. Domenichelli <daniele.domenichelli@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus/qdbusconnection_p.h')
-rw-r--r--src/dbus/qdbusconnection_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
index 515eab6dfe..350e49a50d 100644
--- a/src/dbus/qdbusconnection_p.h
+++ b/src/dbus/qdbusconnection_p.h
@@ -178,6 +178,7 @@ public:
typedef QMultiHash<QString, SignalHook> SignalHookHash;
typedef QHash<QString, QDBusMetaObject* > MetaObjectHash;
typedef QHash<QByteArray, int> MatchRefCountHash;
+ typedef QList<QDBusPendingCallPrivate*> PendingCallList;
struct WatchedServiceData {
WatchedServiceData() : refcount(0) {}
@@ -316,6 +317,7 @@ public:
MatchRefCountHash matchRefCounts;
ObjectTreeNode rootNode;
MetaObjectHash cachedMetaObjects;
+ PendingCallList pendingCalls;
QMutex callDeliveryMutex;
QDBusCallDeliveryEvent *callDeliveryState; // protected by the callDeliveryMutex mutex