mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-25 17:21:27 -05:00
fixed bug causing JSon api server to start twice, and therefore stopping RS because the port was already listen to
This commit is contained in:
parent
c2cb63b40c
commit
636d477aea
@ -116,15 +116,15 @@ RsAccounts* rsAccounts = nullptr;
|
|||||||
|
|
||||||
RsConfigOptions::RsConfigOptions()
|
RsConfigOptions::RsConfigOptions()
|
||||||
:
|
:
|
||||||
#ifdef RS_JSONAPI
|
|
||||||
jsonApiPort(JsonApiServer::DEFAULT_PORT),
|
|
||||||
jsonApiBindAddress("127.0.0.1"),
|
|
||||||
#endif
|
|
||||||
autoLogin(false),
|
autoLogin(false),
|
||||||
forcedPort(0),
|
|
||||||
udpListenerOnly(false),
|
udpListenerOnly(false),
|
||||||
|
forcedPort(0),
|
||||||
outStderr(false),
|
outStderr(false),
|
||||||
debugLevel(5)
|
debugLevel(5),
|
||||||
|
#ifdef RS_JSONAPI
|
||||||
|
jsonApiPort(0), // JSonAPI server is enabled in each main()
|
||||||
|
jsonApiBindAddress("127.0.0.1")
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,6 +233,8 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||||||
|
|
||||||
RsConfigOptions conf;
|
RsConfigOptions conf;
|
||||||
|
|
||||||
|
conf.jsonApiPort = 0 ; // disable JSon API at start. The JSonAPI preference UI will enable it according to saved parameters.
|
||||||
|
|
||||||
argstream as(argc,argv);
|
argstream as(argc,argv);
|
||||||
as >> option('s',"stderr" ,conf.outStderr ,"output to stderr instead of log file." )
|
as >> option('s',"stderr" ,conf.outStderr ,"output to stderr instead of log file." )
|
||||||
>> option('u',"udp" ,conf.udpListenerOnly,"Only listen to UDP." )
|
>> option('u',"udp" ,conf.udpListenerOnly,"Only listen to UDP." )
|
||||||
|
@ -120,6 +120,8 @@ int main(int argc, char* argv[])
|
|||||||
std::string prefUserString;
|
std::string prefUserString;
|
||||||
RsConfigOptions conf;
|
RsConfigOptions conf;
|
||||||
|
|
||||||
|
conf.jsonApiPort = JsonApiServer::DEFAULT_PORT; // enable JSonAPI by default
|
||||||
|
|
||||||
argstream as(argc,argv);
|
argstream as(argc,argv);
|
||||||
as >> option( 's', "stderr", conf.outStderr,
|
as >> option( 's', "stderr", conf.outStderr,
|
||||||
"output to stderr instead of log file." )
|
"output to stderr instead of log file." )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user