summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-03-05 19:16:39 +0100
committerMax Kellermann <max@duempel.org>2016-03-05 19:16:39 +0100
commitb24a5e06620b41546c75bc693277857feb1fa506 (patch)
treeaf4f8c98d34ccd859085be8d544894d226fbd9e8 /src/client
parente52ac0b187bc822eb45d5589e1d9637a348e7a54 (diff)
Partition: add method EmitIdle()
Prepare for moving idle events to class Partition. Right now, it's just a wrapper for idle_add().
Diffstat (limited to 'src/client')
-rw-r--r--src/client/ClientSubscribe.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/ClientSubscribe.cxx b/src/client/ClientSubscribe.cxx
index 9aac84519..2a8eb57e4 100644
--- a/src/client/ClientSubscribe.cxx
+++ b/src/client/ClientSubscribe.cxx
@@ -19,6 +19,7 @@
#include "config.h"
#include "ClientInternal.hxx"
+#include "Partition.hxx"
#include "Idle.hxx"
#include <assert.h>
@@ -40,7 +41,7 @@ Client::Subscribe(const char *channel)
++num_subscriptions;
- idle_add(IDLE_SUBSCRIPTION);
+ partition.EmitIdle(IDLE_SUBSCRIPTION);
return Client::SubscribeResult::OK;
}
@@ -57,7 +58,7 @@ Client::Unsubscribe(const char *channel)
subscriptions.erase(i);
--num_subscriptions;
- idle_add(IDLE_SUBSCRIPTION);
+ partition.EmitIdle(IDLE_SUBSCRIPTION);
assert((num_subscriptions == 0) ==
subscriptions.empty());