allowed some clients to Event handler to register with type NONE, which means that all event types will be sent to the client

This commit is contained in:
csoler 2020-01-11 19:01:43 +01:00
parent f76b81ba49
commit 6a4c98b2ed
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
2 changed files with 20 additions and 25 deletions

View file

@ -331,13 +331,13 @@ JsonApiServer::JsonApiServer(): configMutex("JsonApiServer config"),
rsEvents, "rsEvents", cAns, session ) )
return;
uint32_t event_type;
RsEventType eventType = RsEventType::NONE;
// deserialize input parameters from JSON
{
RsGenericSerializer::SerializeContext& ctx(cReq);
RsGenericSerializer::SerializeJob j(RsGenericSerializer::FROM_JSON);
RS_SERIAL_PROCESS(event_type);
RS_SERIAL_PROCESS(eventType);
}
const std::weak_ptr<rb::Session> weakSession(session);
@ -374,7 +374,7 @@ JsonApiServer::JsonApiServer(): configMutex("JsonApiServer config"),
} );
};
bool retval = rsEvents->registerEventsHandler(static_cast<RsEventType>(event_type),multiCallback, hId);
bool retval = rsEvents->registerEventsHandler(eventType,multiCallback, hId);
{
RsGenericSerializer::SerializeContext& ctx(cAns);