X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Flttv%2Ftracecontext.c;h=3d28927dcbb87ed6dac1d20d1b372b36e18b40aa;hb=f82dffaef20dd0a80565842bf20b9de428850035;hp=657664b721e93e9381085493b420312e4825ecd3;hpb=f0ca53e9f04bad0dfc7aac9978fdf11d760f399b;p=lttv.git diff --git a/ltt/branches/poly/lttv/lttv/tracecontext.c b/ltt/branches/poly/lttv/lttv/tracecontext.c index 657664b7..3d28927d 100644 --- a/ltt/branches/poly/lttv/lttv/tracecontext.c +++ b/ltt/branches/poly/lttv/lttv/tracecontext.c @@ -953,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, @@ -1083,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);