From 787390017131eb3f9b2a1f4e9f46218e43a69448 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Fri, 7 Mar 2008 11:48:41 +0000 Subject: [PATCH] yet another cornercase in attribute names --- org.glite.lb.client/src/Event.cpp.T | 3 ++- org.glite.lb.client/src/JobStatus.cpp.T | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/org.glite.lb.client/src/Event.cpp.T b/org.glite.lb.client/src/Event.cpp.T index b5d9e8a..88d715c 100644 --- a/org.glite.lb.client/src/Event.cpp.T +++ b/org.glite.lb.client/src/Event.cpp.T @@ -324,12 +324,13 @@ Event::name(void) const static std::string const attr_names[Event::ATTR_MAX] = { @@@{ - my %s = (JOBID=>'jobId', NOTIFID=>'notifId'); # XXX + my %s; for (getAllFields $event) { my $id = $_; $id =~ s/([a-z])([A-Z])/$1_$2/g; $s{uc($id)} = $_; + $s{uc($_)} = $_; } for (@main::EventAttrNames) { gen "\t\"$s{$_}\",\n"; diff --git a/org.glite.lb.client/src/JobStatus.cpp.T b/org.glite.lb.client/src/JobStatus.cpp.T index 3403039..12a71ae 100644 --- a/org.glite.lb.client/src/JobStatus.cpp.T +++ b/org.glite.lb.client/src/JobStatus.cpp.T @@ -416,6 +416,7 @@ static std::string const attr_names[JobStatus::ATTR_MAX] = { my $id = $_; $id =~ s/([a-z])([A-Z])/$1_$2/g; $s{uc($id)} = $_; + $s{uc($_)} = $_; } for (@main::StatusAttrNames) { gen "\t\"$s{$_}\",\n"; -- 1.8.2.3