From d9c7e051499e95280912ac3a896dd42c279162f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20Salvet?= Date: Thu, 27 Apr 2006 07:51:27 +0000 Subject: [PATCH] Increment sequence code only after successfull logging. --- org.glite.lb.client/src/producer.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/org.glite.lb.client/src/producer.c b/org.glite.lb.client/src/producer.c index d709f61..55520d6 100644 --- a/org.glite.lb.client/src/producer.c +++ b/org.glite.lb.client/src/producer.c @@ -371,10 +371,7 @@ static int edg_wll_LogEventMaster( goto edg_wll_logeventmaster_end; } seq = edg_wll_GetSequenceCode(context); - if (edg_wll_IncSequenceCode(context)) { - ret = EINVAL; - goto edg_wll_logeventmaster_end; - } + if (trio_asprintf(&fix,EDG_WLL_FORMAT_COMMON, date,context->p_host,lvl,priority, source,context->p_instance ? context->p_instance : "", @@ -435,6 +432,10 @@ edg_wll_logeventmaster_end: if (eventName) free(eventName); if (fullid) free(fullid); + if (!ret) if(edg_wll_IncSequenceCode(context)) { + edg_wll_SetError(context,ret = EINVAL,"edg_wll_LogEventMaster(): edg_wll_IncSequenceCode failed"); + } + if (ret) edg_wll_UpdateError(context,0,"Logging library ERROR: "); return edg_wll_Error(context,NULL,NULL); -- 1.8.2.3