forgot to commit this file

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4097 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-03-16 08:28:31 +00:00
parent 7049920f68
commit 49aad683b1

View File

@ -404,8 +404,9 @@ int TextPage::nextId() const {
std::string certstr; std::string certstr;
certstr = friendCertEdit->toPlainText().toStdString(); certstr = friendCertEdit->toPlainText().toStdString();
std::string error_string ;
RsPeerDetails pd; RsPeerDetails pd;
if ( rsPeers->loadDetailsFromStringCert(certstr, pd) ) { if ( rsPeers->loadDetailsFromStringCert(certstr, pd,error_string) ) {
#ifdef FRIEND_WIZARD_DEBUG #ifdef FRIEND_WIZARD_DEBUG
std::cerr << "ConnectFriendWizard got id : " << pd.id << "; gpg_id : " << pd.gpg_id << std::endl; std::cerr << "ConnectFriendWizard got id : " << pd.id << "; gpg_id : " << pd.gpg_id << std::endl;
#endif #endif
@ -425,7 +426,7 @@ int TextPage::nextId() const {
else else
{ {
// error message // error message
wizard()->setField("errorMessage", tr("Certificate Load Failed") ); wizard()->setField("errorMessage", tr("Certificate Load Failed")+": "+QString::fromStdString(error_string) );
return ConnectFriendWizard::Page_ErrorMessage; return ConnectFriendWizard::Page_ErrorMessage;
} }
@ -776,7 +777,8 @@ int CertificatePage::nextId() const
if (certstr.empty() == false) { if (certstr.empty() == false) {
RsPeerDetails pd; RsPeerDetails pd;
if ( rsPeers->loadDetailsFromStringCert(certstr, pd) ) { std::string error_string ;
if ( rsPeers->loadDetailsFromStringCert(certstr, pd,error_string) ) {
#ifdef FRIEND_WIZARD_DEBUG #ifdef FRIEND_WIZARD_DEBUG
std::cerr << "ConnectFriendWizard got id : " << pd.id << "; gpg_id : " << pd.gpg_id << std::endl; std::cerr << "ConnectFriendWizard got id : " << pd.id << "; gpg_id : " << pd.gpg_id << std::endl;
#endif #endif
@ -793,7 +795,7 @@ int CertificatePage::nextId() const
return ConnectFriendWizard::Page_Conclusion ; return ConnectFriendWizard::Page_Conclusion ;
} else { } else {
wizard()->setField("errorMessage", QString(tr("Certificate Load Failed:something is wrong with %1 ")).arg(fn) ); wizard()->setField("errorMessage", QString(tr("Certificate Load Failed:something is wrong with %1 ")).arg(fn)+": "+QString::fromStdString(error_string) );
return ConnectFriendWizard::Page_ErrorMessage; return ConnectFriendWizard::Page_ErrorMessage;
} }
} else { } else {
@ -975,7 +977,8 @@ void ConclusionPage::initializePage() {
std::cerr << "Conclusion page id : " << id << "; gpg_id : " << gpg_id << std::endl; std::cerr << "Conclusion page id : " << id << "; gpg_id : " << gpg_id << std::endl;
RsPeerDetails detail; RsPeerDetails detail;
if (!rsPeers->loadDetailsFromStringCert(certString, detail)) { std::string error_string ;
if (!rsPeers->loadDetailsFromStringCert(certString, detail,error_string)) {
if (!rsPeers->getPeerDetails(id, detail)) { if (!rsPeers->getPeerDetails(id, detail)) {
if (!rsPeers->getPeerDetails(gpg_id, detail)) { if (!rsPeers->getPeerDetails(gpg_id, detail)) {
rsiface->unlockData(); /* UnLock Interface */ rsiface->unlockData(); /* UnLock Interface */