diff options
author | Marja Hassinen <marja.hassinen@nokia.com> | 2010-12-07 10:11:19 +0200 |
---|---|---|
committer | Marja Hassinen <marja.hassinen@nokia.com> | 2010-12-07 10:11:19 +0200 |
commit | 1000d53b52fee87be0a969254472efef4904301f (patch) | |
tree | a08085594ad8b4c64979563e9e11c435e421358e | |
parent | ac242064e080f5b53c77b8b91fbf37242f29b676 (diff) |
Adding comments about some "unexpected but possible" lcs behavior.
-rw-r--r-- | libcontextsubscriber/src/contextkitplugin.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libcontextsubscriber/src/contextkitplugin.cpp b/libcontextsubscriber/src/contextkitplugin.cpp index 55786d69..2f038d40 100644 --- a/libcontextsubscriber/src/contextkitplugin.cpp +++ b/libcontextsubscriber/src/contextkitplugin.cpp @@ -124,6 +124,14 @@ void ContextKitPlugin::reset() /// appears. void ContextKitPlugin::onProviderAppeared() { + // It is possible that this function is called and we have a Subscribe call + // in progress. This happens when things happen in the following order: + // 1. the subscriber is started + // 2. the subscriber optimistically sends the Subscribe call + // 3. the provider is started (quick enough to handle the Subscribe call) + // 4. providerListener notices that the provider was started + // In this case, the plugin is in "ready" state already. + contextDebug() << "Provider appeared:" << busName; reset(); @@ -199,14 +207,14 @@ void ContextKitPlugin::useNewProtocol() Q_EMIT ready(); } -/// Signals the Provider that the subscribe is finished. +/// Signals the Provider that the Subscribe call (old protocol) is finished. void ContextKitPlugin::onDBusSubscribeFinished(QList<QString> keys) { Q_FOREACH (const QString& key, keys) Q_EMIT subscribeFinished(key); } -/// Signals the Provider that the subscribe is failed. +/// Signals the Provider that the Subscribe call (old protocol) has failed. void ContextKitPlugin::onDBusSubscribeFailed(QList<QString> keys, QString error) { Q_FOREACH (const QString& key, keys) |