From 89655c2785f9448963ab3cd828b34e2e1a664109 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Tue, 17 Feb 2009 16:33:37 +0000 Subject: [PATCH] foolproof JDL parsing (the field may not contain classad but just filename temporarily) --- org.glite.lb.common/src/status.c.T | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.glite.lb.common/src/status.c.T b/org.glite.lb.common/src/status.c.T index f9358f2..83d1902 100644 --- a/org.glite.lb.common/src/status.c.T +++ b/org.glite.lb.common/src/status.c.T @@ -211,6 +211,10 @@ char *edg_wll_JDLField(edg_wll_JobStat *stat, const char *field_name) if (stat->jdl_classad == NULL) { //classad had not been unparsed yet stat->jdl_classad = (struct classad*)cclassad_create(stat->jdl); + + /* XXX: Can't parse, likely due to filename + which is logged first, than replaced by content */ + if (!stat->jdl_classad) return NULL; } if (cclassad_evaluate_to_string(stat->jdl_classad, field_name, &extr_val)) { -- 1.8.2.3