From: caro Date: Thu, 8 Oct 2009 21:16:26 +0000 (+0000) Subject: fix eet_init() when called several times but is failing X-Git-Tag: submit/2.0alpha-wayland/20121127.222001~431 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84c394aabb6ccae193585129d9f55173bbe356be;p=profile%2Fivi%2Feet.git fix eet_init() when called several times but is failing git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@42971 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/eet_lib.c b/src/lib/eet_lib.c index 015dbf8..76d7090 100644 --- a/src/lib/eet_lib.c +++ b/src/lib/eet_lib.c @@ -740,7 +740,7 @@ eet_init(void) /* Disable warning messages about problems with the secure memory subsystem. This command should be run right after gcry_check_version. */ if (gcry_control(GCRYCTL_DISABLE_SECMEM_WARN)) - return 0; + return --eet_init_count; /* This command is used to allocate a pool of secure memory and thus enabling the use of secure memory. It also drops all extra privileges the process has (i.e. if it is run as setuid (root)). If the argument nbytes @@ -751,7 +751,7 @@ eet_init(void) WRN("BIG FAT WARNING: I AM UNABLE TO REQUEST SECMEM, Cryptographic operation are at risk !"); } if (gnutls_global_init()) - return 0; + return --eet_init_count; #endif #ifdef HAVE_OPENSSL ERR_load_crypto_strings(); @@ -782,7 +782,7 @@ eet_init(void) EVP_cleanup(); ERR_free_strings(); #endif - return 0; + return --eet_init_count; } EAPI int