Allow only one instance for useLocalServer option activated. If exists,

pass to it arguments.

For now, only allow to pass RsCollection file and retroshare://
protocol.
This commit is contained in:
Phenom 2016-03-01 13:08:33 +01:00
parent 9871b37ef2
commit 10bb542e83
19 changed files with 547 additions and 426 deletions

View file

@ -98,8 +98,7 @@ class RsInit
* Post Login Options
*/
static bool getStartMinimised() ;
static std::string getRetroShareLink();
static bool getStartMinimised();
static int getSslPwdLen();
static bool getAutoLogin();

View file

@ -128,8 +128,6 @@ class RsInitConfig
std::string load_trustedpeer_file;
bool udpListenerOnly;
std::string RetroShareLink;
};
static RsInitConfig *rsInitConfig = NULL;
@ -363,7 +361,8 @@ int RsInit::InitRetroShare(int argcIgnored, char **argvIgnored, bool strictCheck
>> parameter('p',"port" ,rsInitConfig->port ,"port", "Set listenning port to use." ,false)
>> parameter('c',"base-dir" ,opt_base_dir ,"directory", "Set base directory." ,false)
>> parameter('U',"user-id" ,prefUserString ,"ID", "[User Name/GPG id/SSL id] Sets Account to Use, Useful when Autologin is enabled",false)
>> parameter('r',"link" ,rsInitConfig->RetroShareLink ,"retroshare://...", "Use a given Retroshare Link" ,false)
// by rshare 'r' "link" "Link" "Open RsLink with protocol retroshare://"
// by rshare 'f' "rsfile" "RsFile" "Open RsFile like RsCollection"
#ifdef LOCALNET_TESTING
>> parameter('R',"restrict-port" ,portRestrictions ,"port1-port2","Apply port restriction" ,false)
#endif
@ -774,11 +773,6 @@ bool RsInit::getStartMinimised()
return rsInitConfig->startMinimised;
}
std::string RsInit::getRetroShareLink()
{
return rsInitConfig->RetroShareLink;
}
int RsInit::getSslPwdLen(){
return SSLPWD_LEN;
}