+ }
+ m_p->release_assoc(package);
+}
+
+void yf::Z3950Client::configure(const xmlNode *ptr)
+{
+ for (ptr = ptr->children; ptr; ptr = ptr->next)
+ {
+ if (ptr->type != XML_ELEMENT_NODE)
+ continue;
+ if (!strcmp((const char *) ptr->name, "timeout"))
+ {
+ std::string timeout_str = yp2::xml::get_text(ptr);
+ int timeout_sec = atoi(timeout_str.c_str());
+ if (timeout_sec < 2)
+ throw yp2::filter::FilterException("Bad timeout value "
+ + timeout_str);
+ m_p->m_timeout_sec = timeout_sec;
+ }
+ else
+ {
+ throw yp2::filter::FilterException("Bad element "
+ + std::string((const char *)
+ ptr->name));
+ }