From: Miloš Mulač Date: Mon, 26 Mar 2007 13:13:10 +0000 (+0000) Subject: prevent coredumping when sending events to not running logd X-Git-Tag: merge_31_3_head_after~17 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=6108a9f6ff361de16a8c5bb3eae4f364712fb63b;p=jra1mw.git prevent coredumping when sending events to not running logd - possitive error codes may arrive - do not return uninitialized value --- 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; }