projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
One line log: scan, init
[metaproxy-moved-to-github.git]
/
src
/
filter_session_shared.cpp
diff --git
a/src/filter_session_shared.cpp
b/src/filter_session_shared.cpp
index
6066b4a
..
9b62174
100644
(file)
--- a/
src/filter_session_shared.cpp
+++ b/
src/filter_session_shared.cpp
@@
-195,6
+195,7
@@
namespace metaproxy_1 {
int m_resultset_max;
int m_session_ttl;
bool m_optimize_search;
int m_resultset_max;
int m_session_ttl;
bool m_optimize_search;
+ bool m_restart;
int m_session_max;
};
}
int m_session_max;
};
}
@@
-757,9
+758,10
@@
restart:
}
}
}
}
- if (!session_restarted &&
+ if (m_p->m_restart && !session_restarted &&
condition == YAZ_BIB1_TEMPORARY_SYSTEM_ERROR)
{
condition == YAZ_BIB1_TEMPORARY_SYSTEM_ERROR)
{
+ package.log("session_shared", YLOG_LOG, "restart");
bc->remove_backend(found_backend);
session_restarted = true;
found_backend.reset();
bc->remove_backend(found_backend);
session_restarted = true;
found_backend.reset();
@@
-791,8
+793,9
@@
restart:
return; // search error
}
}
return; // search error
}
}
- if (!session_restarted && new_set->m_result_set_size < 0)
+ if (m_p->m_restart && !session_restarted && new_set->m_result_set_size < 0)
{
{
+ package.log("session_shared", YLOG_LOG, "restart");
bc->remove_backend(found_backend);
session_restarted = true;
found_backend.reset();
bc->remove_backend(found_backend);
session_restarted = true;
found_backend.reset();
@@
-1066,6
+1069,7
@@
yf::SessionShared::Rep::Rep()
m_resultset_max = 10;
m_session_ttl = 90;
m_optimize_search = true;
m_resultset_max = 10;
m_session_ttl = 90;
m_optimize_search = true;
+ m_restart = false;
m_session_max = 100;
}
m_session_max = 100;
}
@@
-1228,6
+1232,10
@@
void yf::SessionShared::configure(const xmlNode *ptr, bool test_only,
m_p->m_optimize_search =
mp::xml::get_bool(attr->children, true);
}
m_p->m_optimize_search =
mp::xml::get_bool(attr->children, true);
}
+ else if (!strcmp((const char *) attr->name, "restart"))
+ {
+ m_p->m_restart = mp::xml::get_bool(attr->children, true);
+ }
else
throw mp::filter::FilterException(
"Bad attribute " + std::string((const char *)
else
throw mp::filter::FilterException(
"Bad attribute " + std::string((const char *)