Browse Source

...

synchronous
Volker Birk 5 years ago
parent
commit
d33c1add00
  1. 9
      callback_dispatcher.cc
  2. 4
      callback_dispatcher.hh

9
callback_dispatcher.cc

@ -5,15 +5,6 @@
pEp::CallbackDispatcher pEp::callback_dispatcher; pEp::CallbackDispatcher pEp::callback_dispatcher;
namespace pEp { namespace pEp {
bool CallbackDispatcher::once = true;
CallbackDispatcher::CallbackDispatcher()
{
if (!once)
throw std::out_of_range("CallbackDispatcher is a singleton");
once = false;
}
PEP_STATUS CallbackDispatcher::messageToSend(::message *msg) PEP_STATUS CallbackDispatcher::messageToSend(::message *msg)
{ {
return callback_dispatcher._messageToSend(msg); return callback_dispatcher._messageToSend(msg);

4
callback_dispatcher.hh

@ -21,11 +21,7 @@ namespace pEp {
}; };
std::vector<callbacks> targets; std::vector<callbacks> targets;
static bool once;
public: public:
CallbackDispatcher();
void add( void add(
::messageToSend_t messageToSend, ::messageToSend_t messageToSend,
::notifyHandshake_t notifyHandshake, ::notifyHandshake_t notifyHandshake,

Loading…
Cancel
Save