mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-23 14:39:34 -05:00
code cleaning
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2006 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d2a1084c27
commit
6055c30832
@ -282,8 +282,6 @@ void p3ConnectMgr::setOwnNetConfig(uint32_t netMode, uint32_t visState)
|
|||||||
|
|
||||||
void p3ConnectMgr::netReset()
|
void p3ConnectMgr::netReset()
|
||||||
{
|
{
|
||||||
|
|
||||||
std::cerr << "p3ConnectMgr::netReset()" << std::endl;
|
|
||||||
//don't do a net reset if the MIN_TIME_BETWEEN_NET_RESET is not reached
|
//don't do a net reset if the MIN_TIME_BETWEEN_NET_RESET is not reached
|
||||||
time_t delta = time(NULL) - mNetInitTS;
|
time_t delta = time(NULL) - mNetInitTS;
|
||||||
#ifdef CONN_DEBUG
|
#ifdef CONN_DEBUG
|
||||||
@ -307,14 +305,12 @@ void p3ConnectMgr::netReset()
|
|||||||
// Will initiate a new call for determining the external ip.
|
// Will initiate a new call for determining the external ip.
|
||||||
mExtAddrFinder->reset() ;
|
mExtAddrFinder->reset() ;
|
||||||
|
|
||||||
std::cerr << "p3ConnectMgr::netReset() reset NetStatus" << std::endl;
|
|
||||||
{
|
{
|
||||||
RsStackMutex stack(connMtx); /****** STACK LOCK MUTEX *******/
|
RsStackMutex stack(connMtx); /****** STACK LOCK MUTEX *******/
|
||||||
mNetStatus = RS_NET_UNKNOWN;
|
mNetStatus = RS_NET_UNKNOWN;
|
||||||
netStatusReset();
|
netStatusReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cerr << "p3ConnectMgr::netReset() checkNetAddress" << std::endl;
|
|
||||||
/* check Network Address */
|
/* check Network Address */
|
||||||
checkNetAddress();
|
checkNetAddress();
|
||||||
|
|
||||||
@ -710,7 +706,7 @@ void p3ConnectMgr::networkConsistencyCheck()
|
|||||||
std::cerr << "p3ConnectMgr::networkConsistencyCheck() time since last reset : " << delta << std::endl;
|
std::cerr << "p3ConnectMgr::networkConsistencyCheck() time since last reset : " << delta << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool doNetReset = false;
|
bool doNetReset = false;
|
||||||
//if one of the flag is degrated from true to false during last tick, let's do a reset
|
//if one of the flag is degrated from true to false during last tick, let's do a reset
|
||||||
#ifdef CONN_DEBUG
|
#ifdef CONN_DEBUG
|
||||||
std::cerr << "p3ConnectMgr::networkConsistencyCheck() net flags : " << std::endl;
|
std::cerr << "p3ConnectMgr::networkConsistencyCheck() net flags : " << std::endl;
|
||||||
|
@ -735,7 +735,6 @@ static bool checkAccount(std::string accountdir, accountId &id)
|
|||||||
LoadCheckX509andGetName(cert_name.c_str(), id.sslName, id.sslId);
|
LoadCheckX509andGetName(cert_name.c_str(), id.sslName, id.sslId);
|
||||||
std::cerr << "sslName: " << id.sslName << " id: " << id.sslId << std::endl;
|
std::cerr << "sslName: " << id.sslName << " id: " << id.sslId << std::endl;
|
||||||
|
|
||||||
#ifndef PQI_USE_SSLONLY
|
|
||||||
std::string tmpid;
|
std::string tmpid;
|
||||||
if (LoadCheckX509andGetIssuerName(cert_name.c_str(), id.pgpId, tmpid))
|
if (LoadCheckX509andGetIssuerName(cert_name.c_str(), id.pgpId, tmpid))
|
||||||
{
|
{
|
||||||
@ -751,7 +750,6 @@ static bool checkAccount(std::string accountdir, accountId &id)
|
|||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,12 +41,6 @@ StartDialog::StartDialog(QWidget *parent, Qt::WFlags flags)
|
|||||||
/* Invoke Qt Designer generated QObject setup routine */
|
/* Invoke Qt Designer generated QObject setup routine */
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
|
|
||||||
/**
|
|
||||||
#if (QT_VERSION >= 040300)
|
|
||||||
skinobject = new QSkinObject(this);
|
|
||||||
skinobject->startSkinning();
|
|
||||||
#endif**/
|
|
||||||
|
|
||||||
RshareSettings config;
|
RshareSettings config;
|
||||||
config.loadWidgetInformation(this);
|
config.loadWidgetInformation(this);
|
||||||
|
|
||||||
@ -71,8 +65,6 @@ StartDialog::StartDialog(QWidget *parent, Qt::WFlags flags)
|
|||||||
/* load the Certificate File name */
|
/* load the Certificate File name */
|
||||||
std::string userName;
|
std::string userName;
|
||||||
|
|
||||||
#ifdef RS_USE_PGPSSL
|
|
||||||
|
|
||||||
#ifndef WINDOWS_SYS /* UNIX */
|
#ifndef WINDOWS_SYS /* UNIX */
|
||||||
//hide autologin because it's not functionnal on other than windows system
|
//hide autologin because it's not functionnal on other than windows system
|
||||||
ui.autoBox->hide();
|
ui.autoBox->hide();
|
||||||
@ -123,48 +115,6 @@ StartDialog::StartDialog(QWidget *parent, Qt::WFlags flags)
|
|||||||
{
|
{
|
||||||
ui.loadName->setCurrentIndex(pidx);
|
ui.loadName->setCurrentIndex(pidx);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
std::list<std::string> pgpIds;
|
|
||||||
std::list<std::string>::iterator it;
|
|
||||||
if (RsInit::GetPGPLogins(pgpIds))
|
|
||||||
{
|
|
||||||
for(it = pgpIds.begin(); it != pgpIds.end(); it++)
|
|
||||||
{
|
|
||||||
const QVariant & userData = QVariant(QString::fromStdString(*it));
|
|
||||||
std::string name, email;
|
|
||||||
RsInit::GetPGPLoginDetails(*it, name, email);
|
|
||||||
ui.loadName->addItem(QString::fromStdString(name), userData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
if (RsInit::ValidateCertificate(userName))
|
|
||||||
{
|
|
||||||
/* just need to enter password */
|
|
||||||
ui.loadName->addItem(QString::fromStdString(userName));
|
|
||||||
//ui.loadName->setText(QString::fromStdString(userName));
|
|
||||||
ui.loadPasswd->setFocus(Qt::OtherFocusReason);
|
|
||||||
ui.loadButton -> setEnabled(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* need to generate new user */
|
|
||||||
ui.loadName->addItem("<No Existing User>");
|
|
||||||
//ui.loadName->setText("<No Existing User>");
|
|
||||||
ui.loadButton -> setEnabled(false);
|
|
||||||
//ui.genName->setFocus(Qt::OtherFocusReason);
|
|
||||||
}
|
|
||||||
#ifndef Q_WS_WIN
|
|
||||||
ui.autoBox->setChecked(false) ;
|
|
||||||
ui.autoBox->setEnabled(false) ;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//ui.genFriend -> setText("<None Selected>");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user