Openvpn scripts fixes
some refactoring
This commit is contained in:
parent
c7dafe9c00
commit
bfdbe27a8d
5 changed files with 74 additions and 51 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include <QCoreApplication>
|
||||
#include <QFileInfo>
|
||||
#include <QTcpSocket>
|
||||
|
||||
#include "communicator.h"
|
||||
#include "debug.h"
|
||||
|
|
@ -94,8 +95,11 @@ QString OpenVpnProtocol::configPath() const
|
|||
|
||||
void OpenVpnProtocol::writeCommand(const QString& command)
|
||||
{
|
||||
QTextStream stream(reinterpret_cast<QIODevice*>(m_managementServer.socket()));
|
||||
stream << command << endl;
|
||||
QIODevice *device = dynamic_cast<QIODevice*>(m_managementServer.socket().data());
|
||||
if (device) {
|
||||
QTextStream stream(device);
|
||||
stream << command << endl;
|
||||
}
|
||||
}
|
||||
|
||||
QString OpenVpnProtocol::openVpnExecPath() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue