From 566a4c9780a80f4bbee08c16695b81c7c5d8d3bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20Salvet?= Date: Fri, 17 Feb 2006 10:35:44 +0000 Subject: [PATCH] Use passed timeout instead of starting arbitrary new one. --- org.glite.lb.server/src/il_lbproxy.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/org.glite.lb.server/src/il_lbproxy.c b/org.glite.lb.server/src/il_lbproxy.c index 4b682e7..487c847 100644 --- a/org.glite.lb.server/src/il_lbproxy.c +++ b/org.glite.lb.server/src/il_lbproxy.c @@ -18,7 +18,6 @@ edg_wll_EventSendProxy( const edg_wlc_JobId jobid, const char *event) { - struct timeval timeout; long filepos; char *jobid_s, *event_file = NULL; @@ -28,9 +27,6 @@ edg_wll_EventSendProxy( edg_wll_ResetError(ctx); - timeout.tv_sec = EDG_WLL_LOG_TIMEOUT_MAX; - timeout.tv_usec = 0; - jobid_s = edg_wlc_JobIdGetUnique(jobid); if ( !jobid_s ) { edg_wll_SetError(ctx, ENOMEM, "edg_wlc_JobIdGetUnique()"); @@ -44,13 +40,16 @@ edg_wll_EventSendProxy( } if ( edg_wll_log_event_write(ctx, event_file, event, - FCNTL_ATTEMPTS, FCNTL_TIMEOUT, &filepos) ) { + (ctx->p_tmp_timeout.tv_sec > FCNTL_ATTEMPTS ? + ctx->p_tmp_timeout.tv_sec : FCNTL_ATTEMPTS), + FCNTL_TIMEOUT, &filepos) ) { + edg_wll_UpdateError(ctx, 0, "edg_wll_log_event_write()"); _err(1); } if ( edg_wll_log_event_send(ctx, lbproxy_ilog_socket_path, filepos, - event, strlen(event), 1, &timeout) ) { + event, strlen(event), 1, &ctx->p_tmp_timeout) ) { edg_wll_UpdateError(ctx, 0, "edg_wll_log_event_send()"); _err(-1); } -- 1.8.2.3