libssh init

This commit is contained in:
pokamest 2022-12-14 21:50:52 +01:00
parent a611ddea2d
commit 951d915326
2 changed files with 6 additions and 0 deletions

View file

@ -43,7 +43,12 @@ using namespace QSsh;
ServerController::ServerController(std::shared_ptr<Settings> settings, QObject *parent) : ServerController::ServerController(std::shared_ptr<Settings> settings, QObject *parent) :
m_settings(settings) m_settings(settings)
{ {
ssh_init();
}
ServerController::~ServerController()
{
ssh_finalize();
} }
ErrorCode ServerController::connectToHost(const ServerCredentials &credentials, ssh_session &session) { ErrorCode ServerController::connectToHost(const ServerCredentials &credentials, ssh_session &session) {

View file

@ -26,6 +26,7 @@ class ServerController : public QObject
Q_OBJECT Q_OBJECT
public: public:
ServerController(std::shared_ptr<Settings> settings, QObject *parent = nullptr); ServerController(std::shared_ptr<Settings> settings, QObject *parent = nullptr);
~ServerController();
typedef QList<QPair<QString, QString>> Vars; typedef QList<QPair<QString, QString>> Vars;