From: Aleš Křenek Date: Wed, 17 May 2006 06:31:58 +0000 (+0000) Subject: Merge the "don't increment seq. # on error" patch from 3.1 X-Git-Tag: glite-lb-client_R_2_1_4~4 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=aca397ab0a097ca134db0c0055ae0d0c9275e71b;p=jra1mw.git Merge the "don't increment seq. # on error" patch from 3.1 --- diff --git a/org.glite.lb.client/src/producer.c b/org.glite.lb.client/src/producer.c index ac05f44..813bce9 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);