X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Ftracecontext.c;h=3d28927dcbb87ed6dac1d20d1b372b36e18b40aa;hb=e62e7f3a20cc94539fab3595f8aec3b6f4fce304;hp=9eaec78395e32be88422873dd500dabf83bc6ade;hpb=aaecaa999a51da6f31979c3a98825545ce8e35c8;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/tracecontext.c b/ltt/branches/poly/lttv/lttv/tracecontext.c index 9eaec783..3d28927d 100644 --- a/ltt/branches/poly/lttv/lttv/tracecontext.c +++ b/ltt/branches/poly/lttv/lttv/tracecontext.c @@ -21,6 +21,7 @@ #endif #include +#include #include #include #include @@ -952,27 +953,11 @@ gboolean lttv_process_traceset_seek_position(LttvTracesetContext *self, static LttField * find_field(LttEventType *et, const GQuark field) { - LttType *t; - - LttField *f; - - guint i, nb; - GQuark name; - /* Field is unset */ if(field == 0) return NULL; - f = ltt_eventtype_field(et); - t = ltt_eventtype_type(et); - g_assert(ltt_type_class(t) == LTT_STRUCT); - nb = ltt_type_member_number(t); - for(i = 0 ; i < nb ; i++) { - ltt_type_member_type(t, i, &name); - if(name == field) break; - } - g_assert(i < nb); - return ltt_field_member(f, i); + return ltt_eventtype_field_by_name(et, field); } LttvTraceHookByFacility *lttv_trace_hook_get_fac(LttvTraceHook *th, @@ -1082,8 +1067,9 @@ event_error: g_quark_to_string(event)); goto free; facility_error: - g_error("No %s facility", g_quark_to_string(facility)); - goto free; + //Ignore this type of error : some facilities are not required. + //g_error("No %s facility", g_quark_to_string(facility)); + return -1; free: g_array_free(th->fac_index, TRUE); g_array_free(th->fac_list, TRUE);