From 574e4b8ad56b0cced409417f76e90205fb28fe22 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Wed, 26 Oct 2016 23:17:10 -0200 Subject: [PATCH] efl_io_copier: work around efl_future weirdness. The pointer given to efl_future_use() should be NULL-ified before calling my function, since that pointer has no meaning anymore. The copier relied on pd->job being NULL to avoid useless rescheduling, it was being reached with non-null, but that pointer is no longer useful. Moreover, I'm not sure if the second pointer, with the new future won't be modified to NULL when the efl_future continues :-( --- src/lib/ecore/efl_io_copier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/ecore/efl_io_copier.c b/src/lib/ecore/efl_io_copier.c index ab5314aef4..0b2667c72d 100644 --- a/src/lib/ecore/efl_io_copier.c +++ b/src/lib/ecore/efl_io_copier.c @@ -98,6 +98,8 @@ _efl_io_copier_job(void *data, const Efl_Event *ev EINA_UNUSED) uint64_t old_total = pd->progress.total; _COPIER_DBG(o, pd); + pd->job = NULL; /* XXX TODO this should be NULL-ified by efl_promise before calling this function */ + efl_ref(o); if (pd->source && efl_io_reader_can_read_get(pd->source))