Hi all
here a proposed patch for ecore_file_download_abort().
It simply add a call the complete_callback (with an error status)
So that when the download is aborted the creator is aware of the deletion.

I need this while fixing/improving exchange, this is my use case:
When exchange start a download it return the Ecore_File_Download_Job*
so that the application can interrupt the process
using ecore_file_download_abort().
With this patch exchange can free the allocated resource if someone abort
its downloads.

Suggestions?objections?ideas?
Dave


Index: src/lib/ecore_file/ecore_file_download.c
===================================================================
--- src/lib/ecore_file/ecore_file_download.c (revisione 47200)
+++ src/lib/ecore_file/ecore_file_download.c (copia locale)
@@ -293,7 +293,8 @@
 #endif

 /**
- * Abort the given download job
+ * Abort the given download job and call the @p completion_cb function with
a
+ * @status of 1 (error)
  * @param  job The download job to abort
  */

@@ -301,6 +302,8 @@
 ecore_file_download_abort(Ecore_File_Download_Job *job)
 {
 #ifdef BUILD_ECORE_CON
+   if (job->completion_cb)
+     job->completion_cb(ecore_con_url_data_get(job->url_con), job->dst, 1);
 # ifdef HAVE_CURL
    ecore_con_url_destroy(job->url_con);
 # endif
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to