The zebramaps system a warning the first time an inknown index type
is used. This warning, should only be issued if maps were read from
a configfile (zebra_maps_read_file).
-/* $Id: zebramap.c,v 1.62 2007-11-05 11:27:24 adam Exp $
+/* $Id: zebramap.c,v 1.63 2007-11-05 11:36:23 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
Copyright (C) 1995-2007
Index Data ApS
char temp_map_str[2];
const char *temp_map_ptr[2];
WRBUF wrbuf_1;
char temp_map_str[2];
const char *temp_map_ptr[2];
WRBUF wrbuf_1;
zebra_map_t map_list;
zebra_map_t last_map;
};
zebra_map_t map_list;
zebra_map_t last_map;
};
zms->last_map = zm;
zm->next = 0;
zms->last_map = zm;
zm->next = 0;
if (failures)
return ZEBRA_FAIL;
if (failures)
return ZEBRA_FAIL;
+
+ (zms->no_files_read)++;
zebra_maps_t zms = (zebra_maps_t) xmalloc(sizeof(*zms));
zms->nmem = nmem_create();
zebra_maps_t zms = (zebra_maps_t) xmalloc(sizeof(*zms));
zms->nmem = nmem_create();
zms->tabpath = profile_path ? nmem_strdup(zms->nmem, profile_path) : 0;
zms->tabroot = 0;
if (base_path)
zms->tabpath = profile_path ? nmem_strdup(zms->nmem, profile_path) : 0;
zms->tabroot = 0;
if (base_path)
zms->wrbuf_1 = wrbuf_alloc();
zms->wrbuf_1 = wrbuf_alloc();
+ zms->no_files_read = 0;
{
zm = zebra_add_map(zms, id, ZEBRA_MAP_TYPE_INDEX);
{
zm = zebra_add_map(zms, id, ZEBRA_MAP_TYPE_INDEX);
- /* no reason to warn if no maps are installed at ALL
- Note that zebra_add_maps increments no_maps ..
- */
- if (zms->no_maps > 1)
+ /* no reason to warn if no maps are read from file */
+ if (zms->no_files_read)
yaz_log(YLOG_WARN, "Unknown register type: %s", id);
yaz_log(YLOG_WARN, "Unknown register type: %s", id);
- else
- zms->no_maps = 0;
zm->maptab_name = nmem_strdup(zms->nmem, "@");
zm->completeness = 0;
zm->maptab_name = nmem_strdup(zms->nmem, "@");
zm->completeness = 0;