mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 07:25:36 -04:00
Fix JSON API event handler registering behavior
As a bonus the behaviour is now homogeneous between C++ API and JSON API Fix a bunch of compiler warning RsEvents implementation is now safer mHandlerMaps size is known at compile time, so use an std::array instead of vector
This commit is contained in:
parent
ce5f5faa97
commit
4c0baa1ec3
17 changed files with 165 additions and 139 deletions
|
@ -352,7 +352,7 @@ JsonApiServer::JsonApiServer(): configMutex("JsonApiServer config"),
|
|||
rsEvents, "rsEvents", cAns, session ) )
|
||||
return;
|
||||
|
||||
RsEventType eventType = RsEventType::NONE;
|
||||
RsEventType eventType = RsEventType::__NONE;
|
||||
|
||||
// deserialize input parameters from JSON
|
||||
{
|
||||
|
@ -395,7 +395,8 @@ JsonApiServer::JsonApiServer(): configMutex("JsonApiServer config"),
|
|||
} );
|
||||
};
|
||||
|
||||
bool retval = rsEvents->registerEventsHandler(eventType,multiCallback, hId);
|
||||
bool retval = rsEvents->registerEventsHandler(
|
||||
multiCallback, hId, eventType );
|
||||
|
||||
{
|
||||
RsGenericSerializer::SerializeContext& ctx(cAns);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue