-/* $Id: logic.c,v 1.28 2007-05-14 08:01:39 marc Exp $
+/* $Id: logic.c,v 1.29 2007-05-16 17:16:21 quinn Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
{
struct session_database *sdb = find_session_database(se, dbname);
struct setting *new = nmem_malloc(se->session_nmem, sizeof(*new));
- int offset = settings_offset(setting);
+ int offset = settings_offset_cprefix(setting);
if (offset < 0)
{
yaz_log(YLOG_WARN, "Unknown setting %s", setting);
return;
}
+ if (offset == PZ_ID)
+ {
+ yaz_log(YLOG_WARN, "No need to set pz:id setting. Ignoring");
+ return;
+ }
new->precedence = 0;
new->target = dbname;
new->name = setting;
-/* $Id: settings.c,v 1.20 2007-04-23 09:06:20 marc Exp $
+/* $Id: settings.c,v 1.21 2007-05-16 17:16:21 quinn Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
// Ignores everything after second colon, if present
// A bit of a hack to support the pz:cclmap: scheme (and more to come?)
-static int settings_offset_cprefix(const char *name)
+int settings_offset_cprefix(const char *name)
{
const char *p;
int maxlen = 100;
-/* $Id: settings.h,v 1.16 2007-04-22 15:07:10 adam Exp $
+/* $Id: settings.h,v 1.17 2007-05-16 17:16:21 quinn Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
int settings_num(void);
void settings_read(const char *path);
int settings_offset(const char *name);
+int settings_offset_cprefix(const char *name);
void init_settings(void);
#endif