update quickstart
[lttv.git] / ltt / branches / poly / ltt / facility.c
index 9a302d2a1c6c0bbe739c7e2ca40922cd288e67f6..619a4bab3b9f1e45d6b34d901ab9e90b154c96d6 100644 (file)
@@ -102,7 +102,25 @@ int ltt_facility_open(LttFacility *f, LttTrace * t, gchar * pathname)
   while(1){
     token = getToken(&in);
     if(in.type == ENDFILE) break;
-    
+   
+               if(g_ascii_strcasecmp(token, "<")) in.error(&in,"not a facility file");
+               token = getName(&in);
+               if(g_ascii_strcasecmp(token, "?")) in.error(&in,"not a facility file");
+               token = getName(&in);
+               if(g_ascii_strcasecmp(token, "xml")) in.error(&in,"not a facility file");
+               token = getName(&in);
+               if(g_ascii_strcasecmp(token, "version")) in.error(&in,"not a facility file");
+               token = getName(&in);
+               if(g_ascii_strcasecmp(token, "=")) in.error(&in,"not a facility file");
+               token = getQuotedString(&in);
+               if(g_ascii_strcasecmp(token, "1.0")) in.error(&in,"not a facility file");
+               token = getName(&in);
+               if(g_ascii_strcasecmp(token, "?")) in.error(&in,"not a facility file");
+               token = getToken(&in);
+               if(g_ascii_strcasecmp(token, ">")) in.error(&in,"not a facility file");
+
+               token = getToken(&in);
+               
     if(g_ascii_strcasecmp(token, "<")) in.error(&in,"not a facility file");
     token = getName(&in);
 
@@ -281,7 +299,11 @@ void construct_fields(LttFacility *fac,
   type_descriptor_t *td;
   LttType *type;
 
-  field->name = g_quark_from_string(fld->name);
+       if(fld->name)
+         field->name = g_quark_from_string(fld->name);
+       else
+               fld->name = 0;
+
   if(fld->description) {
     len = strlen(fld->description);
     field->description = g_new(gchar, len+1);
This page took 0.041699 seconds and 4 git commands to generate.