Dear all,

fclose() should be called before callback is called to notify user of
download completion because it cannot be flushed sometimes.

Please review this patch.

Index: src/lib/ecore_file/ecore_file_download.c
===================================================================
--- src/lib/ecore_file/ecore_file_download.c    (리비전 65568)
+++ src/lib/ecore_file/ecore_file_download.c    (작업 사본)
@@ -292,11 +292,11 @@ _ecore_file_download_url_complete_cb(voi
    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);


-- 
BRs,
Kim.
Index: src/lib/ecore_file/ecore_file_download.c
===================================================================
--- src/lib/ecore_file/ecore_file_download.c	(리비전 65568)
+++ src/lib/ecore_file/ecore_file_download.c	(작업 사본)
@@ -292,11 +292,11 @@ _ecore_file_download_url_complete_cb(voi
    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);
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to