diff options
author | Adam <Adam@anope.org> | 2013-09-16 06:28:48 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-09-16 06:47:42 -0400 |
commit | e3c05efe5e5085f3db14f1532a92de460b899ab5 (patch) | |
tree | a486474c1eff7e04a7167c1d069d23a93406e171 /modules/extra/m_ldap.cpp | |
parent | 8cbaf7e9904e3cc6aca22566c83ea25959357d48 (diff) |
Remove static variables from functions in modules which causes them to be marked as gnu unique objects, which breaks dlclose()/dlopen() on g++ 4.5+
Diffstat (limited to 'modules/extra/m_ldap.cpp')
-rw-r--r-- | modules/extra/m_ldap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index 4bceb0a61..01e927633 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -80,7 +80,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition int i = ldap_initialize(&this->con, this->server.c_str()); if (i != LDAP_SUCCESS) throw LDAPException("Unable to connect to LDAP service " + this->name + ": " + ldap_err2string(i)); - static const int version = LDAP_VERSION3; + const int version = LDAP_VERSION3; i = ldap_set_option(this->con, LDAP_OPT_PROTOCOL_VERSION, &version); if (i != LDAP_OPT_SUCCESS) throw LDAPException("Unable to set protocol version for " + this->name + ": " + ldap_err2string(i)); @@ -269,7 +269,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition break; } - static struct timeval tv = { 1, 0 }; + struct timeval tv = { 1, 0 }; LDAPMessage *result; int rtype = ldap_result(this->con, LDAP_RES_ANY, 1, &tv, &result); if (rtype <= 0 || this->GetExitState()) |