}
catch (LDAPNoConnection& lnc) {
g_log << Logger::Warning << d_myname << " Connection to LDAP lost, trying to reconnect" << endl;
- if (reconnect())
- this->list(target, domain_id);
- else
- throw PDNSException("Failed to reconnect to LDAP server");
+ if (reconnect()) {
+ return this->list(target, domain_id);
+ }
+ throw PDNSException("Failed to reconnect to LDAP server");
}
catch (LDAPException& le) {
g_log << Logger::Error << d_myname << " Unable to get zone " << target << " from LDAP directory: " << le.what() << endl;
}
catch (LDAPNoConnection& lnc) {
g_log << Logger::Warning << d_myname << " Connection to LDAP lost, trying to reconnect" << endl;
- if (reconnect())
+ if (reconnect()) {
this->lookup(qtype, qname, zoneid, dnspkt);
- else
- throw PDNSException("Failed to reconnect to LDAP server");
+ return;
+ }
+ throw PDNSException("Failed to reconnect to LDAP server");
}
catch (LDAPException& le) {
g_log << Logger::Error << d_myname << " Unable to search LDAP directory: " << le.what() << endl;
}
catch (LDAPNoConnection& lnc) {
g_log << Logger::Warning << d_myname << " Connection to LDAP lost, trying to reconnect" << endl;
- if (reconnect())
- this->getDomainInfo(domain, info);
- else
- throw PDNSException("Failed to reconnect to LDAP server");
+ if (reconnect()) {
+ return this->getDomainInfo(domain, info);
+ }
+ throw PDNSException("Failed to reconnect to LDAP server");
}
catch (LDAPException& le) {
g_log << Logger::Error << d_myname << " Unable to search LDAP directory: " << le.what() << endl;
}
catch (LDAPNoConnection& lnc) {
g_log << Logger::Warning << d_myname << " Connection to LDAP lost, trying to reconnect" << endl;
- if (reconnect())
- this->getUpdatedPrimaries(domains, catalogs, catalogHashes);
- else
- throw PDNSException("Failed to reconnect to LDAP server");
+ if (reconnect()) {
+ return this->getUpdatedPrimaries(domains, catalogs, catalogHashes);
+ }
+ throw PDNSException("Failed to reconnect to LDAP server");
}
catch (LDAPException& le) {
g_log << Logger::Error << d_myname << " Unable to search LDAP directory: " << le.what() << endl;
}
catch (LDAPNoConnection& lnc) {
g_log << Logger::Warning << d_myname << " Connection to LDAP lost, trying to reconnect" << endl;
- if (reconnect())
+ if (reconnect()) {
this->setNotified(id, serial);
- else
- throw PDNSException("Failed to reconnect to LDAP server");
+ return;
+ }
+ throw PDNSException("Failed to reconnect to LDAP server");
}
catch (LDAPException& le) {
g_log << Logger::Error << d_myname << " Unable to search LDAP directory: " << le.what() << endl;
}
catch (LDAPNoConnection& lnc) {
g_log << Logger::Warning << d_myname << " Connection to LDAP lost, trying to reconnect" << endl;
- if (reconnect())
+ if (reconnect()) {
this->setNotified(id, serial);
- else
- throw PDNSException("Failed to reconnect to LDAP server");
+ return;
+ }
+ throw PDNSException("Failed to reconnect to LDAP server");
}
catch (LDAPException& le) {
g_log << Logger::Error << d_myname << " Unable to search LDAP directory: " << le.what() << endl;