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 (parent:
5d13c6c
)
In tl_init_data check for return code from zebra_add_record.
author
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 10 Nov 2006 12:57:49 +0000
(12:57 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 10 Nov 2006 12:57:49 +0000
(12:57 +0000)
test/api/testlib.c
patch
|
blob
|
history
diff --git
a/test/api/testlib.c
b/test/api/testlib.c
index
18f3cd9
..
755d7bc
100644
(file)
--- a/
test/api/testlib.c
+++ b/
test/api/testlib.c
@@
-1,4
+1,4
@@
-/* $Id: testlib.c,v 1.39 2006-10-29 17:20:01 adam Exp $
+/* $Id: testlib.c,v 1.40 2006-11-10 12:57:49 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-148,7
+148,14
@@
int tl_init_data(ZebraHandle zh, const char **recs)
if (zebra_begin_trans (zh, 1) != ZEBRA_OK)
return 0;
for (i = 0; recs[i]; i++)
if (zebra_begin_trans (zh, 1) != ZEBRA_OK)
return 0;
for (i = 0; recs[i]; i++)
- zebra_add_record(zh, recs[i], strlen(recs[i]));
+ {
+ if (zebra_add_record(zh, recs[i], strlen(recs[i])) != ZEBRA_OK)
+ {
+ if (zebra_end_trans(zh) != ZEBRA_OK)
+ return 0;
+ return 0;
+ }
+ }
if (zebra_end_trans(zh) != ZEBRA_OK)
return 0;
zebra_commit(zh);
if (zebra_end_trans(zh) != ZEBRA_OK)
return 0;
zebra_commit(zh);