From 6fbd7f8bc836368622f838d4f93bb43b6659368b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Thu, 16 Oct 2008 13:58:28 +0000 Subject: [PATCH] 'notify receive' can now display attributes stored within the job's JDL, using the -f option (all parameters prefixed with "jdl:" are considered jdl attributes and will be extracted). --- org.glite.lb.client/src/stat_fields.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/org.glite.lb.client/src/stat_fields.cpp b/org.glite.lb.client/src/stat_fields.cpp index 5536409..339d56c 100644 --- a/org.glite.lb.client/src/stat_fields.cpp +++ b/org.glite.lb.client/src/stat_fields.cpp @@ -77,6 +77,7 @@ void glite_lb_print_stat_fields(void **ff,edg_wll_JobStat *s) std::string val; struct timeval t; JobStatus::Attr attr; + char *jdl_param = NULL; std::cout << glite_jobid_unparse(s->jobId) << '\t' << stat.name() << '\t'; @@ -89,14 +90,15 @@ void glite_lb_print_stat_fields(void **ff,edg_wll_JobStat *s) std::cout << stat.getValInt(attr) << '\t'; break; case (JobStatus::STRING_T): - val = stat.getValString(attr); if (attr != JobStatus::JDL) { + val = stat.getValString(attr); std::cout << (val.empty() ? "(null)" : escape(val)) << '\t'; } else { -// printf("\n1: %d\n2: %d\n", f->first, f->second); - //XXX: Treat JDL - // printf("\n\nJDL: %s\n\n", (*f).second); + val = f->second; + jdl_param = edg_wll_JDLField(s, val.c_str()); + std::cout << (jdl_param ? jdl_param : "(null)") << '\t'; + free(jdl_param); jdl_param = NULL; } break; case (JobStatus::TIMEVAL_T): -- 1.8.2.3