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
Refactor: hide reclist structure
[pazpar2-moved-to-github.git]
/
src
/
database.c
diff --git
a/src/database.c
b/src/database.c
index
e030ecc
..
0a87d0c
100644
(file)
--- a/
src/database.c
+++ b/
src/database.c
@@
-26,6
+26,7
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <yaz/log.h>
#include "pazpar2.h"
#include "host.h"
#include "pazpar2.h"
#include "host.h"
@@
-240,14
+241,22
@@
static int match_criterion(struct setting **settings,
return 0;
for (v = c->values; v; v = v->next)
{
return 0;
for (v = c->values; v; v = v->next)
{
- if (offset == PZ_ID)
+ if (c->type == PAZPAR2_STRING_MATCH)
{
{
- if (match_zurl(settings[offset]->value, v->value))
- break;
- }
- else
+ if (offset == PZ_ID)
+ {
+ if (match_zurl(settings[offset]->value, v->value))
+ break;
+ }
+ else
+ {
+ if (!strcmp(settings[offset]->value, v->value))
+ break;
+ }
+ }
+ else if (c->type == PAZPAR2_SUBSTRING_MATCH)
{
{
- if (!strcmp(settings[offset]->value, v->value))
+ if (strstr(settings[offset]->value, v->value))
break;
}
}
break;
}
}