mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 19:12:28 -04:00
Added new return codes to RsInit::InitRetroShare to know, what failed.
Show error box when gpg initialization failed. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3744 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
89f448d282
commit
0e41211f3c
6 changed files with 208 additions and 112 deletions
|
@ -585,8 +585,11 @@ int RsInit::InitRetroShare(int argcIgnored, char **argvIgnored, bool strictCheck
|
|||
setupBaseDir();
|
||||
get_configinit(RsInitConfig::basedir, RsInitConfig::preferedId);
|
||||
|
||||
/* Initialize AuthGPG */
|
||||
AuthGPG::getAuthGPG()->InitAuth();
|
||||
/* Initialize AuthGPG */
|
||||
if (AuthGPG::getAuthGPG()->InitAuth() == false) {
|
||||
std::cerr << "AuthGPG::InitAuth failed" << std::endl;
|
||||
return RS_INIT_AUTH_FAILED;
|
||||
}
|
||||
|
||||
//std::list<accountId> ids;
|
||||
std::list<accountId>::iterator it;
|
||||
|
@ -648,7 +651,7 @@ int RsInit::InitRetroShare(int argcIgnored, char **argvIgnored, bool strictCheck
|
|||
|
||||
if (RsInitConfig::havePasswd)
|
||||
{
|
||||
return 1;
|
||||
return RS_INIT_HAVE_ACCOUNT;
|
||||
}
|
||||
|
||||
RsInit::LoadPassword(RsInitConfig::preferedId, "");
|
||||
|
@ -656,10 +659,10 @@ int RsInit::InitRetroShare(int argcIgnored, char **argvIgnored, bool strictCheck
|
|||
if (RsTryAutoLogin())
|
||||
{
|
||||
RsInit::setAutoLogin(true);
|
||||
return 1;
|
||||
return RS_INIT_HAVE_ACCOUNT;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return RS_INIT_OK;
|
||||
}
|
||||
|
||||
/**************************** Access Functions for Init Data **************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue