mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -04:00
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:
parent
f76b81ba49
commit
6a4c98b2ed
2 changed files with 20 additions and 25 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue