mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 14:20:44 -04:00
fixed compilation in jsonapi to cope with new event type field in registerEventHandler()
This commit is contained in:
parent
2bd5bb5a3e
commit
f76b81ba49
1 changed files with 10 additions and 1 deletions
|
@ -331,6 +331,15 @@ JsonApiServer::JsonApiServer(): configMutex("JsonApiServer config"),
|
||||||
rsEvents, "rsEvents", cAns, session ) )
|
rsEvents, "rsEvents", cAns, session ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
uint32_t event_type;
|
||||||
|
|
||||||
|
// deserialize input parameters from JSON
|
||||||
|
{
|
||||||
|
RsGenericSerializer::SerializeContext& ctx(cReq);
|
||||||
|
RsGenericSerializer::SerializeJob j(RsGenericSerializer::FROM_JSON);
|
||||||
|
RS_SERIAL_PROCESS(event_type);
|
||||||
|
}
|
||||||
|
|
||||||
const std::weak_ptr<rb::Session> weakSession(session);
|
const std::weak_ptr<rb::Session> weakSession(session);
|
||||||
RsEventsHandlerId_t hId = rsEvents->generateUniqueHandlerId();
|
RsEventsHandlerId_t hId = rsEvents->generateUniqueHandlerId();
|
||||||
std::function<void(std::shared_ptr<const RsEvent>)> multiCallback =
|
std::function<void(std::shared_ptr<const RsEvent>)> multiCallback =
|
||||||
|
@ -365,7 +374,7 @@ JsonApiServer::JsonApiServer(): configMutex("JsonApiServer config"),
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
bool retval = rsEvents->registerEventsHandler(multiCallback, hId);
|
bool retval = rsEvents->registerEventsHandler(static_cast<RsEventType>(event_type),multiCallback, hId);
|
||||||
|
|
||||||
{
|
{
|
||||||
RsGenericSerializer::SerializeContext& ctx(cAns);
|
RsGenericSerializer::SerializeContext& ctx(cAns);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue