From 545611a81c7627b6380a0bda6f22cae3c6e16fe1 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 28 Jan 2014 14:52:06 +0100 Subject: [PATCH] Add pz:memcached option Not really in stable YAZ yet, but it does not harm to have it now. --- src/connection.c | 5 ++++- src/settings.c | 1 + src/settings.h | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/connection.c b/src/connection.c index 7f9691a..2524434 100644 --- a/src/connection.c +++ b/src/connection.c @@ -216,7 +216,7 @@ static void non_block_events(struct connection *co) ev = ZOOM_connection_last_event(link); #if 1 - yaz_log(YLOG_DEBUG, "%p Connection ZOOM_EVENT_%s", co, ZOOM_get_event_str(ev)); + yaz_log(YLOG_LOG, "%p Connection ZOOM_EVENT_%s", co, ZOOM_get_event_str(ev)); #endif switch (ev) { @@ -414,6 +414,7 @@ static int connection_connect(struct connection *con, iochan_man_t iochan_man) struct session_database *sdb = client_get_database(con->client); const char *apdulog = session_setting_oneval(sdb, PZ_APDULOG); + const char *memcached = session_setting_oneval(sdb, PZ_MEMCACHED); assert(con); @@ -423,6 +424,8 @@ static int connection_connect(struct connection *con, iochan_man_t iochan_man) if ((charset = session_setting_oneval(sdb, PZ_NEGOTIATION_CHARSET))) ZOOM_options_set(zoptions, "charset", charset); + if (memcached && *memcached) + ZOOM_options_set(zoptions, "memcached", memcached); assert(host->ipport); if (host->proxy) diff --git a/src/settings.c b/src/settings.c index eee6288..e8d6125 100644 --- a/src/settings.c +++ b/src/settings.c @@ -84,6 +84,7 @@ static char *hard_settings[] = { "pz:extendrecs", "pz:authentication_mode", "pz:native_score", + "pz:memcached", 0 }; diff --git a/src/settings.h b/src/settings.h index dc2f1d1..3f306a0 100644 --- a/src/settings.h +++ b/src/settings.h @@ -57,7 +57,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define PZ_EXTENDRECS 34 #define PZ_AUTHENTICATION_MODE 35 #define PZ_NATIVE_SCORE 36 -#define PZ_MAX_EOF 37 +#define PZ_MEMCACHED 37 +#define PZ_MAX_EOF 39 struct setting { -- 1.7.10.4