From: Bluezery <ohpowel@gmail.com>

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
This commit is contained in:
Bluezery 2011-11-24 11:55:50 +00:00 committed by Carsten Haitzler
parent 2c283ada65
commit bad45bb0fa
1 changed files with 1 additions and 1 deletions

View File

@ -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);