Back-ported the rsbetween from zebra 1.4
[idzebra-moved-to-github.git] / index / zebraapi.c
index 0b854ea..ff98ef1 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: zebraapi.c,v 1.120 2004-07-28 08:15:45 adam Exp $
+/* $Id: zebraapi.c,v 1.120.2.2 2004-11-26 11:06:12 adam Exp $
    Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
    Index Data Aps
 
@@ -30,6 +30,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <unistd.h>
 #endif
 
+#include <yaz/log.h>
 #include <yaz/diagbib1.h>
 #include <yaz/pquery.h>
 #include <yaz/sortspec.h>
@@ -1733,6 +1734,8 @@ int zebra_init (ZebraHandle zh)
 
     bfs = bfs_create (res_get (zh->service->global_res, "register"),
                       zh->path_reg);
+    if (!bfs)
+       return -1;
     if (rval && *rval)
         bf_cache (bfs, rval);