mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
fix: release resources when properly
This commit is contained in:
parent
3067e6e911
commit
7bc02a4208
@ -307,7 +307,7 @@ void GPClient::onPortalSuccess(const PortalConfigResponse portalConfig, const QS
|
|||||||
{
|
{
|
||||||
PLOGI << "Portal authentication succeeded.";
|
PLOGI << "Portal authentication succeeded.";
|
||||||
|
|
||||||
// No gateway found in protal configuration
|
// No gateway found in portal configuration
|
||||||
if (portalConfig.allGateways().size() == 0) {
|
if (portalConfig.allGateways().size() == 0) {
|
||||||
PLOGI << "No gateway found in portal configuration, treat the portal address as a gateway.";
|
PLOGI << "No gateway found in portal configuration, treat the portal address as a gateway.";
|
||||||
tryGatewayLogin();
|
tryGatewayLogin();
|
||||||
|
@ -33,7 +33,7 @@ QNetworkReply* gpclient::helper::createRequest(QString url, QByteArray params)
|
|||||||
|
|
||||||
GPGateway gpclient::helper::filterPreferredGateway(QList<GPGateway> gateways, const QString ruleName)
|
GPGateway gpclient::helper::filterPreferredGateway(QList<GPGateway> gateways, const QString ruleName)
|
||||||
{
|
{
|
||||||
PLOGI << gateways.size() << " gateway(s) avaiable, filter the gateways with rule: " << ruleName;
|
PLOGI << gateways.size() << " gateway(s) available, filter the gateways with rule: " << ruleName;
|
||||||
|
|
||||||
GPGateway gateway = gateways.first();
|
GPGateway gateway = gateways.first();
|
||||||
|
|
||||||
|
@ -122,9 +122,18 @@ void PortalAuthenticator::samlAuth()
|
|||||||
|
|
||||||
SAMLLoginWindow *loginWindow = new SAMLLoginWindow;
|
SAMLLoginWindow *loginWindow = new SAMLLoginWindow;
|
||||||
|
|
||||||
connect(loginWindow, &SAMLLoginWindow::success, this, &PortalAuthenticator::onSAMLLoginSuccess);
|
connect(loginWindow, &SAMLLoginWindow::success, [this, loginWindow](const QMap<QString, QString> samlResult) {
|
||||||
connect(loginWindow, &SAMLLoginWindow::fail, this, &PortalAuthenticator::onSAMLLoginFail);
|
onSAMLLoginSuccess(samlResult);
|
||||||
connect(loginWindow, &SAMLLoginWindow::rejected, this, &PortalAuthenticator::onLoginWindowRejected);
|
loginWindow->deleteLater();
|
||||||
|
});
|
||||||
|
connect(loginWindow, &SAMLLoginWindow::fail, [this, loginWindow](const QString msg) {
|
||||||
|
onSAMLLoginFail(msg);
|
||||||
|
loginWindow->deleteLater();
|
||||||
|
});
|
||||||
|
connect(loginWindow, &SAMLLoginWindow::rejected, [this, loginWindow]() {
|
||||||
|
onLoginWindowRejected();
|
||||||
|
loginWindow->deleteLater();
|
||||||
|
});
|
||||||
|
|
||||||
loginWindow->login(preloginResponse.samlMethod(), preloginResponse.samlRequest(), preloginUrl);
|
loginWindow->login(preloginResponse.samlMethod(), preloginResponse.samlRequest(), preloginUrl);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user