projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove declaration of yaz_marc_write_xml
[pazpar2-moved-to-github.git]
/
src
/
pazpar2.c
diff --git
a/src/pazpar2.c
b/src/pazpar2.c
index
f23e608
..
4b99bb2
100644
(file)
--- a/
src/pazpar2.c
+++ b/
src/pazpar2.c
@@
-1,4
+1,4
@@
-/* $Id: pazpar2.c,v 1.43 2007-01-18 16:21:23 quinn Exp $ */
+/* $Id: pazpar2.c,v 1.45 2007-01-19 21:16:11 adam Exp $ */
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
@@
-385,8
+385,6
@@
static void add_facet(struct session *s, const char *type, const char *value)
termlist_insert(s->termlists[i].termlist, value);
}
termlist_insert(s->termlists[i].termlist, value);
}
-int yaz_marc_write_xml();
-
static xmlDoc *normalize_record(struct client *cl, Z_External *rec)
{
struct conf_retrievalprofile *rprofile = cl->database->rprofile;
static xmlDoc *normalize_record(struct client *cl, Z_External *rec)
{
struct conf_retrievalprofile *rprofile = cl->database->rprofile;
@@
-1060,19
+1058,24
@@
void load_simpletargets(const char *fn)
while (fgets(line, 255, f))
{
char *url, *db;
while (fgets(line, 255, f))
{
char *url, *db;
+ char *name;
struct host *host;
struct database *database;
if (strncmp(line, "target ", 7))
continue;
struct host *host;
struct database *database;
if (strncmp(line, "target ", 7))
continue;
+ line[strlen(line) - 1] = '\0';
+
+ if ((name = strchr(line, ';')))
+ *(name++) = '\0';
+
url = line + 7;
url = line + 7;
- url[strlen(url) - 1] = '\0';
- yaz_log(YLOG_DEBUG, "Target: %s", url);
if ((db = strchr(url, '/')))
*(db++) = '\0';
else
db = "Default";
if ((db = strchr(url, '/')))
*(db++) = '\0';
else
db = "Default";
+ yaz_log(YLOG_LOG, "Target: %s, '%s'", url, db);
for (host = hosts; host; host = host->next)
if (!strcmp(url, host->hostport))
break;
for (host = hosts; host; host = host->next)
if (!strcmp(url, host->hostport))
break;
@@
-1125,6
+1128,10
@@
void load_simpletargets(const char *fn)
strcpy(database->url, url);
strcat(database->url, "/");
strcat(database->url, db);
strcpy(database->url, url);
strcat(database->url, "/");
strcat(database->url, db);
+ if (name)
+ database->name = xstrdup(name);
+ else
+ database->name = 0;
database->databases = xmalloc(2 * sizeof(char *));
database->databases[0] = xstrdup(db);
database->databases = xmalloc(2 * sizeof(char *));
database->databases[0] = xstrdup(db);
@@
-1363,7
+1370,8
@@
struct hitsbytarget *hitsbytarget(struct session *se, int *count)
*count = 0;
for (cl = se->clients; cl; cl = cl->next)
{
*count = 0;
for (cl = se->clients; cl; cl = cl->next)
{
- strcpy(res[*count].id, cl->database->host->hostport);
+ res[*count].id = cl->database->url;
+ res[*count].name = cl->database->name;
res[*count].hits = cl->hits;
res[*count].records = cl->records;
res[*count].diagnostic = cl->diagnostic;
res[*count].hits = cl->hits;
res[*count].records = cl->records;
res[*count].diagnostic = cl->diagnostic;