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
Change termlist result to include also empty lists
[pazpar2-moved-to-github.git]
/
src
/
settings.c
diff --git
a/src/settings.c
b/src/settings.c
index
7e25f20
..
d355cf3
100644
(file)
--- a/
src/settings.c
+++ b/
src/settings.c
@@
-1,5
+1,5
@@
/* This file is part of Pazpar2.
/* This file is part of Pazpar2.
- Copyright (C) 2006-2010 Index Data
+ Copyright (C) 2006-2011 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
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
@@
-31,7
+31,7
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <assert.h>
#include <stdio.h>
#include <sys/types.h>
#include <assert.h>
#include <stdio.h>
#include <sys/types.h>
-#include "direntz.h"
+#include <yaz/dirent.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <sys/stat.h>
@@
-41,7
+41,7
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <yaz/nmem.h>
#include <yaz/log.h>
#include <yaz/nmem.h>
#include <yaz/log.h>
-#include "pazpar2.h"
+#include "session.h"
#include "database.h"
#include "settings.h"
#include "database.h"
#include "settings.h"
@@
-59,7
+59,6
@@
static char *hard_settings[] = {
"pz:id",
"pz:name",
"pz:queryencoding",
"pz:id",
"pz:name",
"pz:queryencoding",
- "pz:ip",
"pz:zproxy",
"pz:apdulog",
"pz:sru",
"pz:zproxy",
"pz:apdulog",
"pz:sru",
@@
-68,6
+67,17
@@
static char *hard_settings[] = {
"pz:sort",
"pz:recordfilter",
"pz:pqf_strftime",
"pz:sort",
"pz:recordfilter",
"pz:pqf_strftime",
+ "pz:negotiation_charset",
+ "pz:max_connections",
+ "pz:reuse_connections",
+ "pz:termlist_term_factor",
+ "pz:preferred",
+ "pz:extra_args",
+ "pz:query_syntax",
+ "pz:facetmap:",
+ "pz:limitmap:",
+ "pz:url",
+ "pz:sortmap:",
0
};
0
};
@@
-325,7
+335,7
@@
void expand_settings_array(struct setting ***set_ar, int *num, int offset,
// This is called from grep_databases -- adds/overrides setting for a target
// This is also where the rules for precedence of settings are implemented
// This is called from grep_databases -- adds/overrides setting for a target
// This is also where the rules for precedence of settings are implemented
-static void update_database(void *context, struct database *db)
+static void update_database_fun(void *context, struct database *db)
{
struct setting *set = ((struct update_database_context *)
context)->set;
{
struct setting *set = ((struct update_database_context *)
context)->set;
@@
-335,7
+345,7
@@
static void update_database(void *context, struct database *db)
int offset;
// Is this the right database?
int offset;
// Is this the right database?
- if (!match_zurl(db->url, set->target))
+ if (!match_zurl(db->id, set->target))
return;
offset = settings_create_offset(service, set->name);
return;
offset = settings_create_offset(service, set->name);
@@
-393,7
+403,7
@@
static void update_databases(void *client_data, struct setting *set)
struct update_database_context context;
context.set = set;
context.service = service;
struct update_database_context context;
context.set = set;
context.service = service;
- predef_grep_databases(&context, service, update_database);
+ predef_grep_databases(&context, service, update_database_fun);
}
// This simply copies the 'hard' (application-specific) settings
}
// This simply copies the 'hard' (application-specific) settings
@@
-434,7
+444,7
@@
static void prepare_target_dictionary(void *client_data, struct setting *set)
// If target address is not wildcard, add the database
if (*set->target && !zurl_wildcard(set->target))
// If target address is not wildcard, add the database
if (*set->target && !zurl_wildcard(set->target))
- find_database(set->target, service);
+ create_database_for_service(set->target, service);
// Determine if we already have a dictionary entry
if (!strncmp(set->name, "pz:", 3) && (p = strchr(set->name + 3, ':')))
// Determine if we already have a dictionary entry
if (!strncmp(set->name, "pz:", 3) && (p = strchr(set->name + 3, ':')))