Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
added reset_vpn() to vpninfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikos Mavrogiannopoulos committed Oct 13, 2014
1 parent 117df91 commit 40e3dda
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <iostream>
#include <QTranslator>

#define VERSION "0.5"
#define VERSION "0.6"
#define APP_NAME "openconnect-gui"
#define APP_STRING APP_NAME" "VERSION

Expand Down
2 changes: 1 addition & 1 deletion mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ static void main_loop(VpnInfo *vpninfo, MainWindow *m)
retry = true;
reset_password = true;
m->updateProgressBar(QObject::tr("Authentication failed in batch mode, retrying with batch mode disabled"));
openconnect_reset_ssl(vpninfo->vpninfo);
vpninfo->reset_vpn();
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion vpninfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ int process_auth_form(void *privdata, struct oc_auth_form *form)
ok = dialog.result(text);

if (!ok) goto fail;
} while(text.isEmpty());
} while(text.isEmpty() == true);

if (strcasecmp(opt->name, "password") == 0 && (vpn->password_set == 0 || vpn->form_pass_attempt != 0)) {
vpn->ss->set_password(text);
Expand Down
7 changes: 7 additions & 0 deletions vpninfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ class VpnInfo
SOCKET get_cmd_fd() {
return cmd_fd;
}
void reset_vpn() {
openconnect_reset_ssl(vpninfo);
form_pass_attempt = 0;
password_set = 0;
authgroup_set = 0;
form_attempt = 0;
}
bool get_minimize() {
return ss->get_minimize();
}
Expand Down

0 comments on commit 40e3dda

Please sign in to comment.