On Sat, 16 Oct 2010, Enlightenment SVN wrote:

> Log:
>  init ecore
>
> Author:       discomfitor
> Date:         2010-10-16 15:56:44 -0700 (Sat, 16 Oct 2010)
> New Revision: 53498
>
> Modified:
>  trunk/eeze/src/lib/eeze_main.c
>
> Modified: trunk/eeze/src/lib/eeze_main.c
> ===================================================================
> --- trunk/eeze/src/lib/eeze_main.c    2010-10-16 21:32:08 UTC (rev 53497)
> +++ trunk/eeze/src/lib/eeze_main.c    2010-10-16 22:56:44 UTC (rev 53498)
> @@ -41,7 +41,7 @@
>    if (++_eeze_init_count != 1)
>      return _eeze_init_count;
>
> -   if (!eina_init())
> +   if (!eina_init() || !ecore_init())

better order:

init eina (if fail return 0)
init the log domain (if fail goto shutdown_eina;)
init ecore (if fail goto unregister_log_domain;)
udev_new() (if fail goto shutdown_ecore;)

and on failure:

shutdown ecore:
ecore_shutdown();
unregister_log_domain:
eina_log_domain_unregister(_eeze_udev_log_dom);
shutdown_eina:
eina_shutdown();
return 0;

always return 0 on failure, to be sure.

>      return --_eeze_init_count;
>
>    _eeze_udev_log_dom = eina_log_domain_register
> @@ -85,6 +85,7 @@
>    udev_unref(udev);

shutdown ecore here

Vincent

>    eina_log_domain_unregister(_eeze_udev_log_dom);
>    _eeze_udev_log_dom = -1;
> +   ecore_shutdown();
>    eina_shutdown();
>    return _eeze_init_count;
> }
>
>
> ------------------------------------------------------------------------------
> Download new Adobe(R) Flash(R) Builder(TM) 4
> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
> Flex(R) Builder(TM)) enable the development of rich applications that run
> across multiple browsers and platforms. Download your free trials today!
> http://p.sf.net/sfu/adobe-dev2dev
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
>

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to