X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsession.c;h=75fbb1796d8cd139136c294375af692c2321a07f;hb=a85b7c1595467c60b66840a336f018b098a3ba09;hp=405d53b828a043de2ab1b1c811d8d41600943cda;hpb=8386c19398e731dbbb533c36f149af2efcda34ee;p=pazpar2-moved-to-github.git diff --git a/src/session.c b/src/session.c index 405d53b..75fbb17 100644 --- a/src/session.c +++ b/src/session.c @@ -86,7 +86,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA struct parameters global_parameters = { 0, // dump_records - 0 // debug_mode + 0, // debug_mode + 0, // predictable sessions }; struct client_list { @@ -759,12 +760,6 @@ void session_apply_setting(struct session *se, char *dbname, char *setting, } } -/* Depreciated: use session_destroy */ -void destroy_session(struct session *se) -{ - session_destroy(se); -} - void session_destroy(struct session *se) { struct session_database *sdb; session_log(se, YLOG_DEBUG, "Destroying"); @@ -780,9 +775,13 @@ void session_destroy(struct session *se) { service_destroy(se->service); yaz_mutex_destroy(&se->session_mutex); wrbuf_destroy(se->wrbuf); - } +/* Depreciated: use session_destroy */ +void destroy_session(struct session *se) +{ + session_destroy(se); +} size_t session_get_memory_status(struct session *session) { size_t session_nmem; @@ -859,7 +858,8 @@ struct hitsbytarget *hitsbytarget(struct session *se, int *count, NMEM nmem) res[*count].state = client_get_state_str(cl); res[*count].connected = client_get_connection(cl) ? 1 : 0; session_settings_dump(se, client_get_database(cl), w); - res[*count].settings_xml = w; + res[*count].settings_xml = nmem_strdup(nmem, wrbuf_cstr(w)); + wrbuf_destroy(w); (*count)++; } session_leave(se);