X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=index%2Fzebraapi.c;h=0b854ea60dbc82bd1f478d8720201754b8a05f24;hp=5124ad20f7187777d67e77020d10926f18037aee;hb=4a3a97df9d47b8d099e403308f8015f130366994;hpb=8339e09fa0aff2aa51f6ea3c7bc069f44ab5929a diff --git a/index/zebraapi.c b/index/zebraapi.c index 5124ad2..0b854ea 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,4 +1,4 @@ -/* $Id: zebraapi.c,v 1.119 2004-05-10 08:47:54 adam Exp $ +/* $Id: zebraapi.c,v 1.120 2004-07-28 08:15:45 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -147,7 +147,12 @@ ZebraHandle zebra_open (ZebraService zs) return zh; } -ZebraService zebra_start (const char *configName, Res def_res, Res over_res) +ZebraService zebra_start (const char *configName) +{ + return zebra_start_res(configName, 0, 0); +} + +ZebraService zebra_start_res (const char *configName, Res def_res, Res over_res) { Res res; @@ -1340,7 +1345,10 @@ int zebra_begin_trans (ZebraHandle zh, int rw) (zh->trans_no++); if (zh->trans_w_no) + { + read_res_for_transaction(zh); return 0; + } if (zh->trans_no != 1) { zh->errCode = 2; @@ -1947,7 +1955,7 @@ int zebra_add_record(ZebraHandle zh, int zebra_insert_record (ZebraHandle zh, const char *recordType, int *sysno, const char *match, const char *fname, - const char *buf, int buf_size) + const char *buf, int buf_size, int force_update) { int res; yaz_log(LOG_API,"zebra_insert_record sysno=%d", *sysno); @@ -1990,6 +1998,7 @@ int zebra_update_record (ZebraHandle zh, match, fname, force_update, 1); /* allow_update */ + yaz_log(LOG_LOG, "zebra_update_record returned res=%d", res); zebra_end_trans(zh); return res; } @@ -2084,3 +2093,4 @@ int zebra_sort_by_specstr (ZebraHandle zh, zebra_end_read(zh); return sort_status; } +