DEBIAN_DIST="jessie wheezy squeeze"
UBUNTU_DIST="saucy raring quantal precise oneiric lucid"
CENTOS_DIST="centos5 centos6"
-VERSION=5.0.16
+VERSION=5.0.17
+--- 5.0.17 2014/02/26
+
+Fix ZOOM_connection_connect SEGVs if host==NULL YAZ-746. Problem
+introduced in 5.0.12.
+
+Fix: Setting env YAZ_LOG makes YAZ hang YAZ-745
+yaz_init_gloabsl calls yaz_log_init_globals calls yaz_log_mask_str_x .
+Do not call yaz_init_globals from log_mask_str_x. Problem introduce
+in 5.0.15.
+
--- 5.0.16 2014/02/25
tcpip/SSL COMSTACK: connect tries all getaddrinfo addresses YAZ-743
+yaz (5.0.17-1.indexdata) unstable; urgency=medium
+
+ * Upstream.
+
+ -- Adam Dickmeiss <adam@indexdata.dk> Wed, 26 Feb 2014 11:09:21 +0100
+
yaz (5.0.16-1.indexdata) unstable; urgency=medium
* Upstream.
}
server_address_ip = cs_straddr(stack, server_address_str);
- if (!server_address_ip)
- {
+ if (!server_address_ip) {
fprintf(stderr, "cs_straddr: address could not be resolved\n");
return -1;
}
status = cs_connect(stack, server_address_ip);
- if (status != 0) {
+ if (status) {
fprintf(stderr, "cs_connect: %s\n", cs_strerror(stack));
return -1;
}
+ status = cs_rcvconnect(stack);
+ if (status) {
+ fprintf(stderr, "cs_rcvconnect: %s\n", cs_strerror(stack));
+ return -1;
+ }
+
status = cs_put(stack, protocol_package, protocol_package_length);
if (status) {
fprintf(stderr, "cs_put: %s\n", cs_strerror(stack));
return -1;
}
- /* Now get a response */
+ /* Now get a response */
length_incoming = cs_get(stack, &buf, &size);
if (!length_incoming) {
fprintf(stderr, "Connection closed\n");
/* clean up */
cs_close(stack);
if (buf)
- free(buf);
+ xfree(buf);
return 0;
]]>
</programlisting>
const char *host, int portnum)
{
const char *val;
- const char *http_lead;
initlog();
else
c->lang = 0;
- val = ZOOM_options_get(c->options, "sru");
- if (val && *val && !strstr(host, "://"))
- http_lead = "http://";
- else
- http_lead = "";
- c->sru_mode = get_sru_mode_from_string(val);
-
if (host)
{
char hostn[128];
+ const char *http_lead;
+
+ val = ZOOM_options_get(c->options, "sru");
+ if (val && *val && !strstr(host, "://"))
+ http_lead = "http://";
+ else
+ http_lead = "";
+ c->sru_mode = get_sru_mode_from_string(val);
+
xfree(c->host_port);
if (portnum)
{
return 0;
}
+#if HAVE_LIBMEMCACHED_MEMCACHED_H
+static void wrbuf_vary_puts(WRBUF w, const char *v)
+{
+ if (v)
+ {
+ if (strlen(v) > 40)
+ {
+ wrbuf_sha1_puts(w, v, 1);
+ }
+ else
+ {
+ wrbuf_puts(w, v);
+ }
+ }
+}
+#endif
+
void ZOOM_memcached_resultset(ZOOM_resultset r, ZOOM_query q)
{
#if HAVE_LIBMEMCACHED_MEMCACHED_H
ZOOM_connection c = r->connection;
+
r->mc_key = wrbuf_alloc();
- wrbuf_puts(r->mc_key, "0;");
- wrbuf_puts(r->mc_key, c->host_port);
+ wrbuf_puts(r->mc_key, "1;");
+ wrbuf_vary_puts(r->mc_key, c->host_port);
+ wrbuf_puts(r->mc_key, ";");
+ wrbuf_vary_puts(r->mc_key, ZOOM_resultset_option_get(r, "extraArgs"));
wrbuf_puts(r->mc_key, ";");
- if (c->user)
- wrbuf_puts(r->mc_key, c->user);
+ wrbuf_vary_puts(r->mc_key, c->user);
wrbuf_puts(r->mc_key, ";");
- if (c->group)
- wrbuf_puts(r->mc_key, c->group);
+ wrbuf_vary_puts(r->mc_key, c->group);
wrbuf_puts(r->mc_key, ";");
if (c->password)
wrbuf_sha1_puts(r->mc_key, c->password, 1);
wrbuf_destroy(w);
}
wrbuf_puts(r->mc_key, ";");
- if (r->req_facets)
- wrbuf_puts(r->mc_key, r->req_facets);
+ wrbuf_vary_puts(r->mc_key, r->req_facets);
#endif
}
}
server_address_ip = cs_straddr(stack, server_address_str);
- if (!server_address_ip)
- {
+ if (!server_address_ip) {
fprintf(stderr, "cs_straddr: address could not be resolved\n");
return -1;
}
status = cs_connect(stack, server_address_ip);
- if (status != 0) {
+ if (status) {
fprintf(stderr, "cs_connect: %s\n", cs_strerror(stack));
return -1;
}
+ status = cs_rcvconnect(stack);
+ if (status) {
+ fprintf(stderr, "cs_rcvconnect: %s\n", cs_strerror(stack));
+ return -1;
+ }
+
status = cs_put(stack, protocol_package, protocol_package_length);
if (status) {
fprintf(stderr, "cs_put: %s\n", cs_strerror(stack));
}
/* Now get a response */
-
length_incoming = cs_get(stack, &buf, &size);
if (!length_incoming) {
fprintf(stderr, "Connection closed\n");
/* clean up */
cs_close(stack);
if (buf)
- free(buf);
+ xfree(buf);
return 0;
}