From bad45bb0fac64b3fc2a94d2bdd9c3b6ad0e605ba Mon Sep 17 00:00:00 2001 From: Bluezery Date: Thu, 24 Nov 2011 11:55:50 +0000 Subject: [PATCH] From: Bluezery Subject: [E-devel] [Patch][ecore_file] Fix buffer flush bug fclose() should be called before callback is called to notify user of download completion because it cannot be flushed sometimes. SVN revision: 65572 --- legacy/ecore/src/lib/ecore_file/ecore_file_download.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file_download.c b/legacy/ecore/src/lib/ecore_file/ecore_file_download.c index ca8066550d..c7efc4d6aa 100644 --- a/legacy/ecore/src/lib/ecore_file/ecore_file_download.c +++ b/legacy/ecore/src/lib/ecore_file/ecore_file_download.c @@ -292,11 +292,11 @@ _ecore_file_download_url_complete_cb(void *data __UNUSED__, int type __UNUSED__, job = eina_list_search_unsorted(_job_list, _ecore_file_download_url_compare_job, ev->url_con); if (!ECORE_MAGIC_CHECK(job, ECORE_MAGIC_FILE_DOWNLOAD_JOB)) return ECORE_CALLBACK_PASS_ON; + fclose(job->file); if (job->completion_cb) job->completion_cb(ecore_con_url_data_get(job->url_con), job->dst, ev->status); _job_list = eina_list_remove(_job_list, job); - fclose(job->file); free(job->dst); ecore_con_url_free(job->url_con); free(job);