Work on bug #550: Avoid exit. In particular the mfile/cfile/bfile has
[idzebra-moved-to-github.git] / index / zinfo.c
index 669f366..9d5bb3d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: zinfo.c,v 1.69 2006-09-15 10:45:13 adam Exp $
+/* $Id: zinfo.c,v 1.71 2006-11-14 08:12:08 adam Exp $
    Copyright (C) 1995-2006
    Index Data ApS
 
@@ -855,8 +855,7 @@ static void zebraExplain_updateAccessInfo (ZebraExplainInfo zei, data1_node *n,
     if (!c)
     {
         data1_pr_tree (zei->dh, n, stdout);
-        exit (0);
-        assert (c);
+        zebra_exit("zebraExplain_updateAccessInfo");
     }
 
     if ((p = accessInfo->attributeSetIds))
@@ -1360,10 +1359,10 @@ int zebraExplain_lookup_attr_str(ZebraExplainInfo zei,
     assert (zei->curDatabaseInfo);
     for (zsui = &zei->curDatabaseInfo->attributeDetails->SUInfo;
         *zsui; zsui = &(*zsui)->next)
-        if ((*zsui)->info.index_type == index_type
-            && (*zsui)->info.cat == cat
-            && (*zsui)->info.which == ZEB_SU_STR 
-            && !yaz_matchstr((*zsui)->info.u.str, str))
+        if ( (index_type == -1 || (*zsui)->info.index_type == index_type)
+             && (*zsui)->info.cat == cat
+             && (*zsui)->info.which == ZEB_SU_STR 
+             && !yaz_matchstr((*zsui)->info.u.str, str))
         {
             struct zebSUInfoB *zsui_this = *zsui;