sprintf(n, "%d", global_parameters.toget);
ZOOM_connection_option_set(link, "count", n);
}
- if (!databaseName || !*databaseName)
- databaseName = "Default";
- ZOOM_connection_option_set(link, "databaseName", databaseName);
+ if (databaseName)
+ ZOOM_connection_option_set(link, "databaseName", databaseName);
ZOOM_connection_option_set(link, "presentChunk", "20");
void connection_continue(struct connection *co)
{
-#if 1
yaz_log(YLOG_LOG, "connection_continue");
iochan_setevent(co->iochan, EVENT_OUTPUT);
-#endif
}
// Close connection and recycle structure
if (sru && *sru)
strcpy(ipport, "http://");
strcat(ipport, host->ipport);
-
+ /* deal with SRU path here because databaseName option is not read in
+ ZOOM in SRU mode */
+ if (sru && *sru)
+ {
+ if (*sdb->database->databases[0])
+ {
+ strcat(ipport, "/");
+ strcat(ipport, sdb->database->databases[0]);
+ }
+ }
ZOOM_connection_connect(link, ipport, 0);
con->link = link;
if ((dbname = strchr(hostport, '/')))
*(dbname++) = '\0';
else
- dbname = "Default";
+ dbname = "";
if (!(host = find_host(hostport)))
return 0;
db = nmem_malloc(nmem, sizeof(*db));