Update Perl internals so that it matches the current Zebra API.
[idzebra-moved-to-github.git] / index / zserver.c
index cfa6587..ca01ed7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: zserver.c,v 1.114 2004-03-29 15:48:14 adam Exp $
+/* $Id: zserver.c,v 1.116 2004-07-28 08:15:45 adam Exp $
    Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
    Index Data Aps
 
@@ -329,6 +329,11 @@ static int bend_scan (void *handle, bend_scan_rr *r)
         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,
@@ -633,7 +638,8 @@ int bend_esrequest (void *handle, bend_esrequest_rr *rr)
                                    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;
@@ -695,7 +701,7 @@ static void bend_start (struct statserv_options_block *sob)
 {
     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);