Ooops. I forgot to attach patch file. :-)

On Mon, Oct 31, 2011 at 11:13 PM, Kim Yunhan <[email protected]> wrote:

>
> Hello.
>
> When I tested with elementary map, there is too many logs on console.
> It makes me difficult to distinguish normal logs that I want to debug. :'-(
> It's libcurl's internal log for representing progress bar like this.
>
> -----
> downloaded : 343 / 363
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time
>  Current
>                                  Dload  Upload   Total   Spent    Left
>  Speed
>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--
>   0
> downloaded : 343 / 362
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time
>  Current
>                                  Dload  Upload   Total   Spent    Left
>  Speed
>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--
>   0
> downloaded : 343 / 361
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time
>  Current
>                                  Dload  Upload   Total   Spent    Left
>  Speed
>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--
>   0
> downloaded : 344 / 365
> downloaded : 345 / 365
> downloaded : 346 / 365
> downloaded : 347 / 365
> -----
>
> So, I want to remove this log.
> And I look around ecore_con_url's code.
> Then I found solution for it.
>
> Index: src/lib/ecore_con/ecore_con_url.c
> ===================================================================
> --- src/lib/ecore_con/ecore_con_url.c (revision 64559)
> +++ src/lib/ecore_con/ecore_con_url.c (working copy)
> @@ -355,6 +355,7 @@
>          // FIXME: For an unknown reason, progress continue to arrive
> after destruction
>          // this prevent any further call to the callback.
>          curl_easy_setopt(url_con->curl_easy, CURLOPT_PROGRESSFUNCTION,
> NULL);
> +        curl_easy_setopt(url_con->curl_easy, CURLOPT_NOPROGRESS,
> EINA_TRUE);
>
>          if (url_con->active)
>            {
>
>
> When ecore_con_url goes to finalize, ecore_con_url remove its own progress
> function from libcurl.
> But final progress function is called in libcurl, and if there is no
> progress function libcurl print out internal progress log message.
> Anyway as you seen above, it's useless!!
> So I set libcurl option CURLOPT_NOPROGRESS, and it makes that be printed
> out no more progress log.
>
> Please review this simple patch, and commit in SVN.
>
> Thanks!
>
>
Index: src/lib/ecore_con/ecore_con_url.c
===================================================================
--- src/lib/ecore_con/ecore_con_url.c   (revision 64559)
+++ src/lib/ecore_con/ecore_con_url.c   (working copy)
@@ -355,6 +355,7 @@
         // FIXME: For an unknown reason, progress continue to arrive after 
destruction
         // this prevent any further call to the callback.
         curl_easy_setopt(url_con->curl_easy, CURLOPT_PROGRESSFUNCTION, NULL);
+        curl_easy_setopt(url_con->curl_easy, CURLOPT_NOPROGRESS, EINA_TRUE);
 
         if (url_con->active)
           {
------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps 
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to