/* This file is part of Pazpar2.
- Copyright (C) 2006-2008 Index Data
+ Copyright (C) 2006-2009 Index Data
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
#endif
#include <signal.h>
-#include <ctype.h>
#include <assert.h>
#include <yaz/log.h>
struct connection {
IOCHAN iochan;
ZOOM_connection link;
- ZOOM_resultset resultset;
struct host *host;
struct client *client;
char *ibuf;
return co->link;
}
-ZOOM_resultset connection_get_resultset(struct connection *co)
-{
- return co->resultset;
-}
-
-void connection_set_resultset(struct connection *co, ZOOM_resultset rs)
-{
- if (co->resultset)
- ZOOM_resultset_destroy(co->resultset);
- co->resultset = rs;
-}
-
static void remove_connection_from_host(struct connection *con)
{
struct connection **conp = &con->host->connections;
ZOOM_connection_destroy(co->link);
iochan_destroy(co->iochan);
}
- if (co->resultset)
- ZOOM_resultset_destroy(co->resultset);
-
yaz_log(YLOG_DEBUG, "Connection destroy %s", co->host->hostport);
remove_connection_from_host(co);
new->zproxy = 0;
client_set_connection(cl, new);
new->link = 0;
- new->resultset = 0;
new->state = Conn_Resolving;
if (host->ipport)
connection_connect(new);
assert(con);
ZOOM_options_set(zoptions, "async", "1");
- ZOOM_options_set(zoptions, "implementationName",
- global_parameters.implementationName);
- ZOOM_options_set(zoptions, "implementationVersion",
- global_parameters.implementationVersion);
+ ZOOM_options_set(zoptions, "implementationName", PACKAGE_NAME);
+ ZOOM_options_set(zoptions, "implementationVersion", VERSION);
if (zproxy && *zproxy)
{
con->zproxy = xstrdup(zproxy);
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;
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/
+