-/* $Id: zserver.c,v 1.113 2004-01-22 11:27:21 adam Exp $
+/* $Id: zserver.c,v 1.117 2004-08-02 10:12:06 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
r->errcode = 1;
return r;
}
+ r->handle = zh;
if (q->auth)
{
if (q->auth->which == Z_IdAuthentication_open)
}
xfree (openpass);
}
+ else if (q->auth->which == Z_IdAuthentication_idPass)
+ {
+ Z_IdPass *idPass = q->auth->u.idPass;
+
+ user = idPass->userId;
+ passwd = idPass->password;
+ }
}
if (zebra_auth (zh, user, passwd))
{
r->errcode = 222;
r->errstring = user;
- zebra_close (zh);
return r;
}
- r->handle = zh;
if (q->charneg_request) /* characater set and langauge negotiation? */
{
char **charsets = 0;
zebra_result (zh, &r->errcode, &r->errstring);
return 0;
}
+ if (r->step_size != 0 && *r->step_size != 0) {
+ r->errcode = 205; /* "Only zero step size supported for Scan" */
+ r->errstring = 0;
+ return 0;
+ }
r->entries = (struct scan_entry *)
odr_malloc (r->stream, sizeof(*r->entries) * r->num_entries);
zebra_scan (zh, r->stream, r->term,
static int es_admin_request (ZebraHandle zh, Z_AdminEsRequest *r)
{
+ if (r->toKeep->databaseName)
+ {
+ yaz_log(LOG_LOG, "adm request database %s", r->toKeep->databaseName);
+ }
switch (r->toKeep->which)
{
case Z_ESAdminOriginPartToKeep_reIndex:
break;
case Z_ESAdminOriginPartToKeep_commit:
yaz_log(LOG_LOG, "adm-commit");
+ if (r->toKeep->databaseName)
+ zebra_select_database(zh, r->toKeep->databaseName);
+ zebra_commit(zh);
break;
case Z_ESAdminOriginPartToKeep_shutdown:
yaz_log(LOG_LOG, "shutdown");
default:
yaz_log(LOG_LOG, "unknown admin");
}
- if (r->toKeep->databaseName)
- {
- yaz_log(LOG_LOG, "database %s", r->toKeep->databaseName);
- }
return 0;
}
0, /* match */
0, /* fname */
rec->u.octet_aligned->buf,
- rec->u.octet_aligned->len);
+ rec->u.octet_aligned->len,
+ 0);
if (r)
{
rr->errcode = 224;
{
if (sob->handle)
zebra_stop((ZebraService) sob->handle);
- sob->handle = zebra_start(sob->configname, 0, 0);
+ sob->handle = zebra_start(sob->configname);
if (!sob->handle)
{
yaz_log (LOG_FATAL, "Failed to read config `%s'", sob->configname);