prevent coredumping when sending events to not running logd
authorMiloš Mulač <mulac@civ.zcu.cz>
Mon, 26 Mar 2007 13:13:10 +0000 (13:13 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Mon, 26 Mar 2007 13:13:10 +0000 (13:13 +0000)
- possitive error codes may arrive
- do not return uninitialized value

org.glite.lb.client/src/prod_proto.c
org.glite.lb.client/src/producer.c

index 21507d7..f45234b 100644 (file)
@@ -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;
 
index 59e5672..9ba942e 100644 (file)
@@ -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;
        }