for seth - reverse order of event arguments

This commit is contained in:
Bernhard Amann 2012-03-16 08:31:19 -07:00
parent 842f635695
commit e59aed6ce3
2 changed files with 7 additions and 7 deletions

View file

@ -274,15 +274,15 @@ bool Manager::CreateEventStream(RecordVal* fval) {
return false; return false;
} }
if ( ! same_type((*args)[0], BifType::Enum::Input::Event, 0) ) if ( ! same_type((*args)[1], BifType::Enum::Input::Event, 0) )
{ {
reporter->Error("events first attribute must be of type Input::Event"); reporter->Error("events second attribute must be of type Input::Event");
return false; return false;
} }
if ( ! same_type((*args)[1], BifType::Record::Input::EventDescription, 0) ) if ( ! same_type((*args)[0], BifType::Record::Input::EventDescription, 0) )
{ {
reporter->Error("events second attribute must be of type Input::EventDescription"); reporter->Error("events first attribute must be of type Input::EventDescription");
return false; return false;
} }
@ -973,11 +973,11 @@ int Manager::SendEventFilterEvent(Filter* i, EnumVal* type, const Value* const *
Val *val; Val *val;
list<Val*> out_vals; list<Val*> out_vals;
Ref(filter->description);
out_vals.push_back(filter->description);
// no tracking, send everything with a new event... // no tracking, send everything with a new event...
//out_vals.push_back(new EnumVal(BifEnum::Input::EVENT_NEW, BifType::Enum::Input::Event)); //out_vals.push_back(new EnumVal(BifEnum::Input::EVENT_NEW, BifType::Enum::Input::Event));
out_vals.push_back(type); out_vals.push_back(type);
Ref(filter->description);
out_vals.push_back(filter->description);
int position = 0; int position = 0;
if ( filter->want_record ) { if ( filter->want_record ) {

View file

@ -20,7 +20,7 @@ type Val: record {
s: string; s: string;
}; };
event line(tpe: Input::Event, description: Input::EventDescription, s: string) { event line(description: Input::EventDescription, tpe: Input::Event, s: string) {
print description; print description;
print s; print s;
} }