From 6108a9f6ff361de16a8c5bb3eae4f364712fb63b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Mon, 26 Mar 2007 13:13:10 +0000 Subject: [PATCH] prevent coredumping when sending events to not running logd - possitive error codes may arrive - do not return uninitialized value --- org.glite.lb.client/src/prod_proto.c | 2 +- org.glite.lb.client/src/producer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.glite.lb.client/src/prod_proto.c b/org.glite.lb.client/src/prod_proto.c index 21507d7..f45234b 100644 --- a/org.glite.lb.client/src/prod_proto.c +++ b/org.glite.lb.client/src/prod_proto.c @@ -200,7 +200,7 @@ get_reply_gss_end: */ int edg_wll_log_connect(edg_wll_Context ctx, int *conn) { - int ret,answer,index; + int ret, answer=0, index; char *my_subject_name = NULL; edg_wll_GssStatus gss_stat; diff --git a/org.glite.lb.client/src/producer.c b/org.glite.lb.client/src/producer.c index 59e5672..9ba942e 100644 --- a/org.glite.lb.client/src/producer.c +++ b/org.glite.lb.client/src/producer.c @@ -89,7 +89,7 @@ int edg_wll_DoLogEvent( memset(&conn,0,sizeof(conn)); /* connect to local-logger */ - if ((ret = edg_wll_log_connect(ctx,&conn)) < 0) { + if ((ret = edg_wll_log_connect(ctx,&conn))) { edg_wll_UpdateError(ctx,EDG_WLL_IL_PROTO,"edg_wll_DoLogEvent(): edg_wll_log_connect error"); goto edg_wll_DoLogEvent_end; } -- 1.8.2.3