X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebraapi.c;h=ab5cf2655f16dc1c060e510d8aac5a9b5c364ca7;hb=6c57b2c269b3b1d16ebf2ab52c3ad3547d5ecdbb;hp=0ff088076e3d76c848506eb8e4a8b1664a63b476;hpb=fc9684841bbfad0b625e7365b99bae7b7df737df;p=idzebra-moved-to-github.git diff --git a/index/zebraapi.c b/index/zebraapi.c index 0ff0880..ab5cf26 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,5 +1,5 @@ -/* $Id: zebraapi.c,v 1.88 2003-03-04 23:30:20 adam Exp $ - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 +/* $Id: zebraapi.c,v 1.91 2003-03-06 11:58:08 adam Exp $ + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003 Index Data Aps This file is part of the Zebra server. @@ -846,7 +846,7 @@ void zebra_scan (ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, } rpn_scan (zh, stream, zapt, attributeset, zh->num_basenames, zh->basenames, position, - num_entries, entries, is_partial); + num_entries, entries, is_partial, 0, 0); zebra_end_read (zh); } @@ -1136,8 +1136,14 @@ int zebra_begin_trans (ZebraHandle zh, int rw) (zh->trans_no++); if (zh->trans_w_no) return 0; + if (zh->trans_no != 1) + { + zh->errCode = 2; + zh->errString = "write trans not allowed within read trans"; + return -1; + } zh->trans_w_no = zh->trans_no; - + zh->errCode=0; yaz_log (LOG_LOG, "zebra_begin_trans");