summaryrefslogtreecommitdiff
path: root/src/connectionhandler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/connectionhandler.cc')
-rw-r--r--src/connectionhandler.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/connectionhandler.cc b/src/connectionhandler.cc
index 6fdcd51..9362965 100644
--- a/src/connectionhandler.cc
+++ b/src/connectionhandler.cc
@@ -27,6 +27,8 @@
*/
#include "connectionhandler.h"
+#include <stdio.h>
+
// Global ConnectionHandler.
ConnectionHandler connection_handler;
@@ -42,11 +44,13 @@ void ConnectionHandler::init(clientid_t clientid)
void ConnectionHandler::close(clientid_t clientid)
{
connlist.erase(clientid);
+ printf("Removed connection\n");
}
void ConnectionHandler::observe(clientid_t clientid, taskid_t taskid)
{
connlist[clientid].insert(taskid);
+ printf("Added observer of %d\n", taskid);
}
void ConnectionHandler::unobserve(clientid_t clientid, taskid_t taskid)
@@ -56,10 +60,12 @@ void ConnectionHandler::unobserve(clientid_t clientid, taskid_t taskid)
std::set<clientid_t> ConnectionHandler::observerlist(TaskIdList tasks)
{
+ printf("Observerlist request\n");
std::set<clientid_t> clients;
for(TaskIdList::iterator i = tasks.begin(); i != tasks.end(); i++) {
taskid_t tid = *i;
+ printf("Locating observers of node %d\n", tid);
for(ConnectionList::iterator ci = connlist.begin();
ci != connlist.end(); ci++) {
std::set<taskid_t>::iterator ti = ci->second.find(tid);