yet another cornercase in attribute names
authorAleš Křenek <ljocha@ics.muni.cz>
Fri, 7 Mar 2008 11:48:41 +0000 (11:48 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Fri, 7 Mar 2008 11:48:41 +0000 (11:48 +0000)
org.glite.lb.client/src/Event.cpp.T
org.glite.lb.client/src/JobStatus.cpp.T

index b5d9e8a..88d715c 100644 (file)
@@ -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";
index 3403039..12a71ae 100644 (file)
@@ -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";