X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsession.c;h=4910ea9e956aa59f75a7b7207c8a05239c87b7c6;hb=858ad41c7c599d44c700c2e8eaab3131ad4011aa;hp=b17b29bedcbf3987f11ce6ea1e1b80cc5baf1610;hpb=2ebf0b250fd141b7a3e186e7e99bfc76e29e39d7;p=pazpar2-moved-to-github.git diff --git a/src/session.c b/src/session.c index b17b29b..4910ea9 100644 --- a/src/session.c +++ b/src/session.c @@ -35,6 +35,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #if HAVE_UNISTD_H #include #endif +#ifdef WIN32 +#include +#endif #include #include #include @@ -52,6 +55,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include +#include #define USE_TIMING 0 #if USE_TIMING @@ -514,7 +518,6 @@ enum pazpar2_error_code search(struct session *se, int no_working = 0; int no_failed = 0; struct client_list *l; - struct timespec abstime; struct timeval tval; yaz_log(YLOG_DEBUG, "Search"); @@ -538,10 +541,9 @@ enum pazpar2_error_code search(struct session *se, } se->reclist = reclist_create(se->nmem); - gettimeofday(&tval, 0); + yaz_gettimeofday(&tval); - abstime.tv_sec = tval.tv_sec + 5; - abstime.tv_nsec = tval.tv_usec * 1000; + tval.tv_sec += 5; for (l = se->clients; l; l = l->next) { @@ -561,7 +563,7 @@ enum pazpar2_error_code search(struct session *se, if (client_prep_connection(cl, se->service->z3950_operation_timeout, se->service->z3950_session_timeout, se->service->server->iochan_man, - &abstime)) + &tval)) client_start_search(cl); } }