const edg_wlc_JobId jobid,
const char *event)
{
- struct timeval timeout;
long filepos;
char *jobid_s,
*event_file = NULL;
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()");
}
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);
}