diff --git a/callback_dispatcher.cc b/callback_dispatcher.cc index 16b066f..89e64c9 100644 --- a/callback_dispatcher.cc +++ b/callback_dispatcher.cc @@ -62,11 +62,11 @@ namespace pEp { void CallbackDispatcher::start_sync() { pEp::Adapter::startup(CallbackDispatcher::messageToSend, - CallbackDispatcher::notifyHandshake, this, + CallbackDispatcher::notifyHandshake, &callback_dispatcher, &CallbackDispatcher::on_startup, &CallbackDispatcher::on_shutdown); - for (auto target : targets) + for (auto target : callback_dispatcher.targets) target.notifyHandshake(nullptr, nullptr, SYNC_NOTIFY_START); } @@ -74,7 +74,7 @@ namespace pEp { { pEp::Adapter::shutdown(); - for (auto target : targets) + for (auto target : callback_dispatcher.targets) target.notifyHandshake(nullptr, nullptr, SYNC_NOTIFY_STOP); } diff --git a/callback_dispatcher.hh b/callback_dispatcher.hh index 785eec9..c6a4e11 100644 --- a/callback_dispatcher.hh +++ b/callback_dispatcher.hh @@ -34,8 +34,8 @@ namespace pEp { ); void remove(::messageToSend_t messageToSend); - void start_sync(); - void stop_sync(); + static void start_sync(); + static void stop_sync(); static PEP_STATUS messageToSend(::message *msg); static PEP_STATUS notifyHandshake(::pEp_identity *me,