mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 11:16:34 -04:00
converted JsonAPI with public api and using RestbedService system
This commit is contained in:
parent
3ca22f0052
commit
a304ec20ef
10 changed files with 198 additions and 206 deletions
|
@ -410,7 +410,11 @@ int RsInit::InitRetroShare(const RsConfigOptions& conf)
|
|||
|
||||
#ifdef RS_JSONAPI
|
||||
if(rsInitConfig->jsonApiPort)
|
||||
JsonApiServer::instance().start(rsInitConfig->jsonApiPort, rsInitConfig->jsonApiBindAddress);
|
||||
{
|
||||
rsJsonAPI->setListeningPort(rsInitConfig->jsonApiPort);
|
||||
rsJsonAPI->setBindingAddress(rsInitConfig->jsonApiBindAddress);
|
||||
rsJsonAPI->restart();
|
||||
}
|
||||
|
||||
#endif // ifdef RS_JSONAPI
|
||||
|
||||
|
@ -1212,7 +1216,15 @@ int RsServer::StartupRetroShare()
|
|||
//
|
||||
mPluginsManager->loadPlugins(programatically_inserted_plugins) ;
|
||||
|
||||
JsonApiServer::setConfigMgr(mConfigMgr);
|
||||
#ifdef RS_JSONAPI
|
||||
mJsonAPIServer = new JsonApiServer;
|
||||
rsJsonAPI = mJsonAPIServer;
|
||||
|
||||
mConfigMgr->addConfiguration("jsonapi.cfg",mJsonAPIServer);
|
||||
|
||||
RsFileHash dummyHash;
|
||||
mJsonAPIServer->loadConfiguration(dummyHash);
|
||||
#endif
|
||||
|
||||
/**** Reputation system ****/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue