mirror of
https://github.com/altlinux/admc.git
synced 2025-03-17 02:50:12 +03:00
Fix race condition problems with AdInterface.
This commit is contained in:
parent
e16079867f
commit
2ddbd00cc9
@ -92,6 +92,7 @@ void *AdInterfacePrivate::s_sasl_nocanon = LDAP_OPT_ON;
|
||||
int AdInterfacePrivate::s_port = 0;
|
||||
CertStrategy AdInterfacePrivate::s_cert_strat = CertStrategy_Never;
|
||||
SMBCCTX *AdInterfacePrivate::smbc = NULL;
|
||||
QMutex AdInterfacePrivate::mutex;
|
||||
|
||||
void get_auth_data_fn(const char *pServer, const char *pShare, char *pWorkgroup, int maxLenWorkgroup, char *pUsername, int maxLenUsername, char *pPassword, int maxLenPassword) {
|
||||
UNUSED_ARG(pServer);
|
||||
@ -327,7 +328,9 @@ void AdInterface::set_cert_strategy(const CertStrategy strategy) {
|
||||
}
|
||||
|
||||
AdInterfacePrivate::AdInterfacePrivate(AdInterface *q_arg) {
|
||||
mutex.lock();
|
||||
q = q_arg;
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
bool AdInterface::is_connected() const {
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QList>
|
||||
#include <QMutex>
|
||||
|
||||
class AdInterface;
|
||||
class AdConfig;
|
||||
@ -34,6 +35,7 @@ class AdInterfacePrivate {
|
||||
Q_DECLARE_TR_FUNCTIONS(AdInterfacePrivate)
|
||||
|
||||
friend AdInterface;
|
||||
static QMutex mutex;
|
||||
|
||||
public:
|
||||
AdInterfacePrivate(AdInterface *q);
|
||||
|
Loading…
x
Reference in New Issue
Block a user