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:
thunder2 2010-11-03 22:54:34 +00:00
parent 89f448d282
commit 0e41211f3c
6 changed files with 208 additions and 112 deletions

View file

@ -135,6 +135,8 @@ AuthGPGimpl::AuthGPGimpl()
{
RsStackMutex stack(gpgMtxEngine); /******* LOCKED ******/
CTX = NULL;
setlocale(LC_ALL, "");
gpgme_check_version(NULL);
gpgme_set_locale(NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL));
@ -197,6 +199,11 @@ bool AuthGPGimpl::InitAuth ()
{
std::string HomeDir;
if (!CTX) {
std::cerr << "Error with gpg initialization. Is gpg missing ?" << std::endl;
return false;
}
#ifdef WINDOWS_SYS
if (RsInit::isPortable ()) {
// set home dir of gpg to configdir\gnupg