projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8e6c661
)
Check for bad zebra_begin_trans usage
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 4 Mar 2003 23:48:55 +0000
(23:48 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 4 Mar 2003 23:48:55 +0000
(23:48 +0000)
index/zebraapi.c
patch
|
blob
|
history
diff --git
a/index/zebraapi.c
b/index/zebraapi.c
index
0ff0880
..
f71682c
100644
(file)
--- a/
index/zebraapi.c
+++ b/
index/zebraapi.c
@@
-1,4
+1,4
@@
-/* $Id: zebraapi.c,v 1.88 2003-03-04 23:30:20 adam Exp $
+/* $Id: zebraapi.c,v 1.89 2003-03-04 23:48:55 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
@@
-1136,8
+1136,14
@@
int zebra_begin_trans (ZebraHandle zh, int rw)
(zh->trans_no++);
if (zh->trans_w_no)
return 0;
(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->trans_w_no = zh->trans_no;
-
+
zh->errCode=0;
yaz_log (LOG_LOG, "zebra_begin_trans");
zh->errCode=0;
yaz_log (LOG_LOG, "zebra_begin_trans");