X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzinfo.c;h=cb69981e90ef9a20dc7bc17f35bfbb203a128d66;hb=10d6601ca574d93bd5534b3a997a6b12305c75bc;hp=105915fed398cf54f4f9169891b0d5bc6672d7b0;hpb=985e8a4d37568d885a9f29171364c1b9818ded9d;p=idzebra-moved-to-github.git diff --git a/index/zinfo.c b/index/zinfo.c index 105915f..cb69981 100644 --- a/index/zinfo.c +++ b/index/zinfo.c @@ -4,7 +4,13 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: zinfo.c,v $ - * Revision 1.12 1998-10-13 20:37:11 adam + * Revision 1.14 1998-11-04 16:31:32 adam + * Fixed bug regarding recordBytes in databaseInfo. + * + * Revision 1.13 1998/11/03 10:17:09 adam + * Fixed bug regarding creation of some data1 nodes for Explain records. + * + * Revision 1.12 1998/10/13 20:37:11 adam * Changed the way attribute sets are saved in Explain database to * reflect "dynamic" OIDs. * @@ -271,9 +277,9 @@ static data1_node *data1_make_tagdata_text (data1_handle dh, data1_node *at, { data1_node *node_data = node->child; node_data->u.data.what = DATA1I_text; - node_data->u.data.data = node_data->lbuf; - strcpy (node_data->u.data.data, str); node_data->u.data.len = strlen (node_data->u.data.data); + node_data->u.data.data = data1_insert_string (dh, node_data, + nmem, str); return node_data; } } @@ -689,9 +695,10 @@ static void zebraExplain_readDatabase (ZebraExplainInfo zei, node_zebra = data1_search_tag (zei->dh, node_dbinfo->child, "zebraInfo"); - np = data1_search_tag (zei->dh, node_dbinfo->child, - "recordBytes"); - if (np && np->child && np->child->which == DATA1N_data) + if (node_zebra + && (np = data1_search_tag (zei->dh, node_zebra->child, + "recordBytes")) + && np->child && np->child->which == DATA1N_data) zdi->recordBytes = atoi_n (np->child->u.data.data, np->child->u.data.len); if ((np = data1_search_tag (zei->dh, node_dbinfo->child,