On Fri, Oct 5, 2012 at 3:07 PM, Enlightenment SVN
<[email protected]> wrote:
> Log:
> ecore: let's try another approach thanks to Guillaume Friloux.
>
>
> Author: cedric
> Date: 2012-10-05 06:07:14 -0700 (Fri, 05 Oct 2012)
> New Revision: 77533
> Trac: http://trac.enlightenment.org/e/changeset/77533
>
> Modified:
> trunk/ecore/src/lib/ecore_con/ecore_con_url.c
>
> Modified: trunk/ecore/src/lib/ecore_con/ecore_con_url.c
> ===================================================================
> --- trunk/ecore/src/lib/ecore_con/ecore_con_url.c 2012-10-05 12:18:51
> UTC (rev 77532)
> +++ trunk/ecore/src/lib/ecore_con/ecore_con_url.c 2012-10-05 13:07:14
> UTC (rev 77533)
> @@ -56,7 +56,7 @@
> static int _init_count = 0;
> static Ecore_Timer *_curl_timer = NULL;
> static Eina_Bool pipelining = EINA_FALSE;
> -
> +Ecore_Idler *_curl_idler;
sholdn't it be a static var ?
Vincent
> #endif
>
> /**
> @@ -91,6 +91,7 @@
>
> _curl_timer = ecore_timer_add((double)ms / 1000, _ecore_con_url_timer,
> NULL);
> ecore_timer_freeze(_curl_timer);
> + _curl_idler = NULL;
>
> return _init_count;
> #else
> @@ -114,6 +115,9 @@
> _curl_timer = NULL;
> }
>
> + if (_curl_idler) ecore_idler_del(_curl_idler);
> + _curl_idler = NULL;
> +
> EINA_LIST_FREE(_url_con_list, url_con)
> ecore_con_url_free(url_con);
> EINA_LIST_FREE(_fd_hd_list, fd_handler)
> @@ -1335,7 +1339,7 @@
>
> e->status = status;
> e->url_con = url_con;
> -
> +
> url_con->event_count++;
> ecore_event_add(ECORE_CON_EVENT_URL_COMPLETE, e,
> (Ecore_End_Cb)_ecore_con_event_url_free, url_con);
> }
> @@ -1549,6 +1553,9 @@
>
> ecore_timer_interval_set(_curl_timer, (double)ms / 1000);
>
> + if (!_curl_timer)
> + _curl_idler = ecore_idler_add(_ecore_con_url_timer, NULL);
> +
> return ECORE_CALLBACK_CANCEL;
> }
>
> @@ -1611,6 +1618,8 @@
> ERR("curl_multi_perform() failed: %s", curl_multi_strerror(ret));
> _ecore_con_url_curl_clear();
> ecore_timer_freeze(_curl_timer);
> + if (_curl_idler) ecore_idler_del(_curl_idler);
> + _curl_idler = NULL;
> }
>
> if (still_running)
> @@ -1628,6 +1637,8 @@
> _ecore_con_url_info_read();
> _ecore_con_url_curl_clear();
> ecore_timer_freeze(_curl_timer);
> + if (_curl_idler) ecore_idler_del(_curl_idler);
> + _curl_idler = NULL;
> }
>
> return ECORE_CALLBACK_RENEW;
>
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel