Some code/comment cleanup

This commit is contained in:
Stefan Persson 2012-12-04 15:05:45 +01:00
parent 9d39fe8d47
commit 9f68c2083a
2 changed files with 1 additions and 6 deletions

View file

@ -60,7 +60,6 @@ int CallbackMainDispatcher::registerCallback(CallbackStruct::CallbackType type,
callback->id = id; callback->id = id;
callback->context = context; callback->context = context;
d->callbackList.push_back(callback); d->callbackList.push_back(callback);
//logga callbackprenumeration lades till
debuglog(id, "Callback added"); debuglog(id, "Callback added");
return id; return id;
} }
@ -70,7 +69,6 @@ int CallbackMainDispatcher::unregisterCallback(int callbackId) {
{ {
TelldusCore::MutexLocker locker(&d->mutex); TelldusCore::MutexLocker locker(&d->mutex);
for(CallbackList::iterator callback_it = d->callbackList.begin(); callback_it != d->callbackList.end(); ++callback_it) { for(CallbackList::iterator callback_it = d->callbackList.begin(); callback_it != d->callbackList.end(); ++callback_it) {
//logga, avregistrering av callback
if ( (*callback_it)->id != callbackId ) { if ( (*callback_it)->id != callbackId ) {
continue; continue;
} }
@ -104,15 +102,11 @@ void CallbackMainDispatcher::run() {
if (!cbd) { if (!cbd) {
continue; continue;
} }
//logga här, att den fortfarande körs, ev till fil bara för att det kan bli så mkt...
//om för mkt, kolla att viss tid gått sedan förra ggn eller ngt...
//debuglog(333, "Callbackevent, signalled"); //debuglog(333, "Callbackevent, signalled");
TelldusCore::MutexLocker locker(&d->mutex); TelldusCore::MutexLocker locker(&d->mutex);
//logga, har låst
//debuglog(333, "Callbackevent, locked"); //debuglog(333, "Callbackevent, locked");
for(CallbackList::iterator callback_it = d->callbackList.begin(); callback_it != d->callbackList.end(); ++callback_it) { for(CallbackList::iterator callback_it = d->callbackList.begin(); callback_it != d->callbackList.end(); ++callback_it) {
if ( (*callback_it)->type == cbd->type ) { if ( (*callback_it)->type == cbd->type ) {
//ev logga här också, att det finns ngnstans att skicka till
//debuglog((*callback_it)->id, "Callbackevent, sending"); //debuglog((*callback_it)->id, "Callbackevent, sending");
std::tr1::shared_ptr<TelldusCore::TDEventDispatcher> ptr(new TelldusCore::TDEventDispatcher(eventData, *callback_it, d->janitor)); std::tr1::shared_ptr<TelldusCore::TDEventDispatcher> ptr(new TelldusCore::TDEventDispatcher(eventData, *callback_it, d->janitor));
d->eventThreadList.push_back(ptr); d->eventThreadList.push_back(ptr);

View file

@ -12,6 +12,7 @@
#include "service/Protocol.h" #include "service/Protocol.h"
#include "service/EventUpdateManager.h" #include "service/EventUpdateManager.h"
#include "common/Strings.h" #include "common/Strings.h"
#include "common/common.h" //debug
class Controller::PrivateData { class Controller::PrivateData {
public: public: