{
LttTracefile * tf;
tf = ltt_tracefile_open(t,tracefile_name);
+ if(!tf) return;
t->per_cpu_tracefile_number++;
g_ptr_array_add(t->per_cpu_tracefiles, tf);
}
g_ptr_array_add(t->control_tracefiles,tf);
//parse facilities tracefile to get base_id
- if(strcmp(control_name,"facilities") ==0){
+ if(strcmp(&control_name[strlen(control_name)-10],"facilities") ==0){
while(1){
ev = ltt_tracefile_read(tf);
if(!ev)return; // end of file
strcat(tmp,"system.xml");
getSystemInfo(sys_description, tmp);
+ //get facilities info
+ getFacilityInfo(t,eventdefs);
+
//get control tracefile info
getControlFileInfo(t,control);
//get cpu tracefile info
getCpuFileInfo(t,cpu);
- //get facilities info
- getFacilityInfo(t,eventdefs);
-
return t;
}