On 30/11/2015 12:32, Peter Xu wrote: > +{ > + DumpQueryResult *result = g_malloc0(sizeof(*result)); > + DumpState *state = dump_state_get_global(); > + result->status = state->status; > + result->written_bytes = state->written_size;
You need a mutex around the reads of ->status and ->written_size. Paolo > + result->total_bytes = state->total_size; > + return result;