X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=recctrl%2Frecgrs.c;h=5b5ee4f1467ae33ae8b691af4e5c3372c091e9ab;hb=c7802a517bf6c79fefd72501e85f08f267c39ea9;hp=aaa7cbae9004e2f500daa41b559c4513c41b55dc;hpb=ee469875edc1db23aae63746ec9fff6a7be8d4ab;p=idzebra-moved-to-github.git diff --git a/recctrl/recgrs.c b/recctrl/recgrs.c index aaa7cba..5b5ee4f 100644 --- a/recctrl/recgrs.c +++ b/recctrl/recgrs.c @@ -4,7 +4,14 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: recgrs.c,v $ - * Revision 1.37 2000-12-05 12:22:53 adam + * Revision 1.39 2000-12-05 19:09:15 adam + * Fixed problem where indexer could crash if abstract syntax was undefined. + * + * Revision 1.38 2000/12/05 14:44:58 adam + * Fixed minor bug that could cause zmbol to break it data were emitted + * with not parent tags. + * + * Revision 1.37 2000/12/05 12:22:53 adam * Termlist source implemented (so that we can index values of XML/SGML * attributes). * @@ -444,10 +451,9 @@ static int dumpkeys(data1_node *n, struct recExtractCtrl *p, int level) printf("NULL\n"); } - assert(par); - - index_tag (par, n, p, level, &wrd); - } + if (par) + index_tag (par, n, p, level, &wrd); + } if (p->flagShowRecords && n->which == DATA1N_root) { printf("%*s-------------\n\n", level * 4, ""); @@ -494,6 +500,8 @@ static int grs_extract_sub(struct grs_handlers *h, struct recExtractCtrl *p, return RECCTRL_EXTRACT_EOF; oe.proto = PROTO_Z3950; oe.oclass = CLASS_SCHEMA; + if (!n->u.root.absyn) + return RECCTRL_EXTRACT_ERROR; oe.value = n->u.root.absyn->reference; if ((oid_ent_to_oid (&oe, oidtmp))) (*p->schemaAdd)(p, oidtmp);