OpenVpn runtime error codes handling
This commit is contained in:
parent
f45fb442de
commit
861c71e3a8
11 changed files with 59 additions and 26 deletions
|
|
@ -119,7 +119,7 @@ ErrorCode OpenVpnProtocol::start()
|
|||
m_openVpnStateSigTermHandlerTimer.stop();
|
||||
stop();
|
||||
|
||||
if (communicator() && !communicator()->connected()) {
|
||||
if (communicator() && !communicator()->isConnected()) {
|
||||
setLastError(ErrorCode::AmneziaServiceConnectionFailed);
|
||||
return lastError();
|
||||
}
|
||||
|
|
@ -213,6 +213,16 @@ void OpenVpnProtocol::onReadyReadDataFromManagementServer()
|
|||
}
|
||||
}
|
||||
|
||||
if (line.contains("FATAL")) {
|
||||
if (line.contains("tap-windows6 adapters on this system are currently in use or disabled")) {
|
||||
emit protocolError(ErrorCode::OpenVpnAdaptersInUseError);
|
||||
}
|
||||
else {
|
||||
emit protocolError(ErrorCode::OpenVpnUnknownError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QByteArray data(line.toStdString().c_str());
|
||||
if (data.contains(">BYTECOUNT:")) {
|
||||
int beg = data.lastIndexOf(">BYTECOUNT:");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue