From: compudj Date: Fri, 16 Sep 2005 20:54:07 +0000 (+0000) Subject: fix trace paused read X-Git-Tag: v0.12.20~2257 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=950683f4336b19c3515f8cfee942be9959cd2214;p=lttv.git fix trace paused read git-svn-id: http://ltt.polymtl.ca/svn@1232 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/ltt/tracefile.c b/ltt/branches/poly/ltt/tracefile.c index ad2cf51a..20978c01 100644 --- a/ltt/branches/poly/ltt/tracefile.c +++ b/ltt/branches/poly/ltt/tracefile.c @@ -954,7 +954,8 @@ static int ltt_process_facility_tracefile(LttTracefile *tf) (tf->event.data + strlen(fac_name) + 1); fac = &g_array_index (tf->trace->facilities_by_num, LttFacility, ltt_get_uint32(LTT_GET_BO(tf), &fac_load_data->id)); - g_assert(fac->exists == 0); + /* facility may already exist if trace is paused/unpaused */ + if(fac->exists) continue; fac->name = g_quark_from_string(fac_name); fac->checksum = ltt_get_uint32(LTT_GET_BO(tf), &fac_load_data->checksum); @@ -1006,7 +1007,8 @@ static int ltt_process_facility_tracefile(LttTracefile *tf) (tf->event.data + strlen(fac_name) + 1); fac = &g_array_index (tf->trace->facilities_by_num, LttFacility, ltt_get_uint32(LTT_GET_BO(tf), &fac_state_dump_load_data->id)); - g_assert(fac->exists == 0); + /* facility may already exist if trace is paused/unpaused */ + if(fac->exists) continue; fac->name = g_quark_from_string(fac_name); fac->checksum = ltt_get_uint32(LTT_GET_BO(tf), &fac_state_dump_load_data->checksum);