* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: ztest.c,v 1.78 2006-03-13 12:14:00 adam Exp $
+ * $Id: ztest.c,v 1.82 2006-12-04 14:56:55 adam Exp $
*/
/*
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
;
}
if (!ill_ItemRequest (rr->decode, &item_req, 0, 0))
{
yaz_log (log_level,
- "Couldn't decode ItemRequest %s near %d",
+ "Couldn't decode ItemRequest %s near %ld",
odr_errmsg(odr_geterror(rr->decode)),
- odr_offset(rr->decode));
+ (long) odr_offset(rr->decode));
}
else
yaz_log(log_level, "Decode ItemRequest OK");
if (!ill_APDU (rr->decode, &ill_apdu, 0, 0))
{
yaz_log (log_level,
- "Couldn't decode ILL APDU %s near %d",
+ "Couldn't decode ILL APDU %s near %ld",
odr_errmsg(odr_geterror(rr->decode)),
- odr_offset(rr->decode));
+ (long) odr_offset(rr->decode));
yaz_log(log_level, "PDU dump:");
odr_dumpBER(yaz_log_file(),
(char *) r->u.single_ASN1_type->buf,