log CollectionState events from proxy with dummy non-cert identity "LBProxy"
authorMiloš Mulač <mulac@civ.zcu.cz>
Tue, 27 Mar 2007 11:26:16 +0000 (11:26 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Tue, 27 Mar 2007 11:26:16 +0000 (11:26 +0000)
- prevents lbproxy to coredump on CollectionState events

org.glite.lb.server/src/jobstat.c

index 5fc8e17..052bb62 100644 (file)
@@ -761,7 +761,11 @@ static int log_collectionState_event(edg_wll_Context ctx, edg_wll_JobStatCode st
        edg_wll_Event  *event = 
                edg_wll_InitEvent(EDG_WLL_EVENT_COLLECTIONSTATE);
 
-       event->any.user = strdup(ctx->serverIdentity);  
+       if (ctx->serverIdentity) 
+               event->any.user = strdup(ctx->serverIdentity);  
+       else
+               event->any.user = strdup("LBProxy");
+
        if (!edg_wll_SetSequenceCode(ctx,pis->last_seqcode,EDG_WLL_SEQ_NORMAL)) {
                ctx->p_source = EDG_WLL_SOURCE_LB_SERVER;
                 edg_wll_IncSequenceCode(ctx);