summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoungJun Cho <yj44.cho@samsung.com>2017-10-10 15:58:37 +0900
committerHyunho Kang <hhstark.kang@samsung.com>2017-10-25 03:39:28 +0000
commit98a0de7c98ec66e84ddc49f7238d7e365ad0a070 (patch)
treed9ba318066daa8a7a7dc8eecbfb9ca9ee592afda
parentd731df129bc1ce6436131f40590b7199b2878f37 (diff)
downloadscreen-connector-tizen_3.0.tar.gz
screen-connector-tizen_3.0.tar.bz2
screen-connector-tizen_3.0.zip
provider: clean up static global variablestizen_3.0
Change-Id: I8e5d4ae7a35097e0e52227d62e0ba8ca74c9a6a7 Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
-rwxr-xr-xscreen_connector_provider/src/screen_connector_provider.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/screen_connector_provider/src/screen_connector_provider.c b/screen_connector_provider/src/screen_connector_provider.c
index 254771f..c162467 100755
--- a/screen_connector_provider/src/screen_connector_provider.c
+++ b/screen_connector_provider/src/screen_connector_provider.c
@@ -35,8 +35,8 @@
#define LOG_TAG "SC_PROVIDER"
-static int __init_count;
-static struct tizen_remote_surface_manager *__rsm;
+static int __init_count = 0;
+static struct tizen_remote_surface_manager *__rsm = NULL;
struct screen_connector_provider_s {
struct wl_surface *surface;
@@ -179,8 +179,10 @@ EXPORT_API int screen_connector_provider_init(void)
Ecore_Wl_Global *global;
Eina_Inlist *globals;
- if (__init_count > 0)
+ if (__init_count > 0) {
+ __init_count++;
return 0;
+ }
ecore_wl_init(NULL);
@@ -214,8 +216,10 @@ EXPORT_API int screen_connector_provider_init(void)
EXPORT_API int screen_connector_provider_fini(void)
{
- if (__init_count > 1)
+ if (__init_count > 1) {
+ __init_count--;
return 0;
+ }
if (__rsm)
tizen_remote_surface_manager_destroy(__rsm);