X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ztest%2Fztest.c;h=88e0a21096a55ff2ec009db5714ca79bb0605142;hb=47d9d5ac3241f8db09ba19a1a5c1fdd5e140e75f;hp=50872a34993ccbd8bd9eb5cc7de7813161f5d9f4;hpb=b3b11da5d7ad0d762d85ca912351351b7181d4d7;p=yaz-moved-to-github.git diff --git a/ztest/ztest.c b/ztest/ztest.c index 50872a3..88e0a21 100644 --- a/ztest/ztest.c +++ b/ztest/ztest.c @@ -1,11 +1,14 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ - /** \file * \brief yaz-ztest Generic Frontend Server */ +#if HAVE_CONFIG_H +#include +#endif + #include #include @@ -210,8 +213,8 @@ static void ztest_sleep(double d) Sleep( (DWORD) (d * 1000)); #else struct timeval tv; - tv.tv_sec = floor(d); - tv.tv_usec = (d - floor(d)) * 1000000; + tv.tv_sec = d; + tv.tv_usec = (d - (long) d) * 1000000; select(0, 0, 0, 0, &tv); #endif } @@ -253,7 +256,7 @@ Z_OtherInformation *build_facet_response(ODR odr, Z_FacetList *facet_list) { for (index = 0; index < facet_list->num; index++) { struct yaz_facet_attr attrvalues; yaz_facet_attr_init(&attrvalues); - attrvalues.limit = 10; + attrvalues.limit = 0; yaz_facet_attr_get_z_attributes(facet_list->elements[index]->attributes, &attrvalues); yaz_log(YLOG_LOG, "Attributes: %s %d ", attrvalues.useattr, attrvalues.limit);