projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extended the GFS search facility. New member of bend_search_rr
[yaz-moved-to-github.git]
/
ztest
/
ztest.c
diff --git
a/ztest/ztest.c
b/ztest/ztest.c
index
e659570
..
dacf640
100644
(file)
--- a/
ztest/ztest.c
+++ b/
ztest/ztest.c
@@
-1,8
+1,8
@@
/*
/*
- * Copyright (C) 1995-2005, Index Data ApS
+ * Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
* See the file LICENSE for details.
*
- * $Id: ztest.c,v 1.79 2006-04-21 10:28:09 adam Exp $
+ * $Id: ztest.c,v 1.85 2007-01-16 14:12:38 adam Exp $
*/
/*
*/
/*
@@
-54,9
+54,19
@@
int ztest_search(void *handle, bend_search_rr *rr)
else if(!yaz_matchstr (rr->basenames[0], "Slow"))
{
#if HAVE_UNISTD_H
else if(!yaz_matchstr (rr->basenames[0], "Slow"))
{
#if HAVE_UNISTD_H
- sleep(3);
+ /* wait up to 3 seconds and check if connection is still alive */
+ int i;
+ for (i = 0; i<3; i++)
+ {
+ if (!bend_assoc_is_alive(rr->association))
+ {
+ yaz_log(YLOG_LOG, "search aborted");
+ break;
+ }
+ sleep(1);
+ }
#endif
#endif
- ;
+ rr->estimated_hit_count = 1;
}
else
{
}
else
{
@@
-663,6
+673,12
@@
int ztest_explain(void *handle, bend_explain_rr *rr)
return 0;
}
return 0;
}
+int ztest_update(void *handle, bend_update_rr *rr)
+{
+ rr->operation_status = "success";
+ return 0;
+}
+
bend_initresult *bend_init(bend_initrequest *q)
{
bend_initresult *r = (bend_initresult *)
bend_initresult *bend_init(bend_initrequest *q)
{
bend_initresult *r = (bend_initresult *)
@@
-690,6
+706,7
@@
bend_initresult *bend_init(bend_initrequest *q)
q->bend_explain = ztest_explain;
#endif
q->bend_srw_scan = ztest_scan;
q->bend_explain = ztest_explain;
#endif
q->bend_srw_scan = ztest_scan;
+ q->bend_srw_update = ztest_update;
return r;
}
return r;
}