X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;ds=sidebyside;f=source%2Fldap%2FSearch.cpp;h=b068f70d3d2c12ba923a236fed9975f3ba7b81fc;hb=b0fce20be4095debc4b06b4b32fc9e6a8b1fa0fa;hp=aedcd12f20ebe9a591a015c645cbf2691237c250;hpb=93366a0bda79e6fd6e7dad6316bfcf8cc82f5731;p=anna.git diff --git a/source/ldap/Search.cpp b/source/ldap/Search.cpp index aedcd12..b068f70 100644 --- a/source/ldap/Search.cpp +++ b/source/ldap/Search.cpp @@ -24,7 +24,7 @@ using namespace anna::ldap; Search::attribute_pool Search::st_attributes; void Search::clear() -throw() { +{ a_base.clear(); a_scope = Scope::Base; clearFilter(); @@ -34,7 +34,7 @@ throw() { } void Search::clearAttributes() -throw() { +{ for(attribute_iterator ii = attribute_begin(), maxii = attribute_end(); ii != maxii; ii ++) st_attributes.release(&attribute(ii)); @@ -42,7 +42,7 @@ throw() { } IdMessage Search::send(Session& session) const -throw() { +{ IdMessage result(-1); LDAP* ldap = (LDAP*) session.getLDAP(); int scope = -1; @@ -51,6 +51,7 @@ throw() { case Scope::Base: scope = LDAP_SCOPE_BASE; break; case Scope::OneLevel: scope = LDAP_SCOPE_ONELEVEL; break; case Scope::SubTree: scope = LDAP_SCOPE_SUBTREE; break; + case Scope::None: return result; break; } int maxi = attribute_size() + 1; @@ -89,7 +90,7 @@ throw() { } string Search::asString() const -throw() { +{ string result("ldap::Search { "); result += Request::asString(); result += " | Base: "; @@ -104,7 +105,7 @@ throw() { } xml::Node* Search::asXML(xml::Node* parent) const -throw() { +{ parent = Request::asXML(parent); parent->createAttribute("Base", a_base); parent->createAttribute("Scope", Scope::asText(a_scope));