summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-11-12 09:32:59 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-11-17 18:41:31 +0900
commite146371ed932e51844c9ecaa9a0a03d095b8a525 (patch)
tree642dfe7beedbc90d20ad1c77ac0b15a59a8d7b80
parenta5489d322b85316a8be56c1a5aa6b0455b9e1332 (diff)
evas modules - only unregister log domain if its registered
some modules did check, some didnt... but this makes them consistent and silences and eina err log. :)
-rw-r--r--src/modules/evas/engines/buffer/evas_engine.c6
-rw-r--r--src/modules/evas/engines/drm/evas_engine.c6
-rw-r--r--src/modules/evas/engines/eglfs/evas_engine.c7
-rw-r--r--src/modules/evas/engines/fb/evas_engine.c6
-rw-r--r--src/modules/evas/engines/gl_drm/evas_engine.c7
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c6
-rw-r--r--src/modules/evas/engines/gl_sdl/evas_engine.c6
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.c6
-rw-r--r--src/modules/evas/engines/psl1ght/evas_engine.c6
-rw-r--r--src/modules/evas/engines/software_ddraw/evas_engine.c6
-rw-r--r--src/modules/evas/engines/software_gdi/evas_engine.c7
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c6
-rw-r--r--src/modules/evas/engines/software_x11/evas_engine.c6
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c6
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.c10
-rw-r--r--src/modules/evas/image_loaders/ico/evas_image_load_ico.c6
-rw-r--r--src/modules/evas/image_loaders/jp2k/evas_image_load_jp2k.c7
-rw-r--r--src/modules/evas/image_loaders/tiff/evas_image_load_tiff.c6
-rw-r--r--src/modules/evas/image_loaders/xpm/evas_image_load_xpm.c6
19 files changed, 95 insertions, 27 deletions
diff --git a/src/modules/evas/engines/buffer/evas_engine.c b/src/modules/evas/engines/buffer/evas_engine.c
index bef4a45..5ee45dc 100644
--- a/src/modules/evas/engines/buffer/evas_engine.c
+++ b/src/modules/evas/engines/buffer/evas_engine.c
@@ -224,7 +224,11 @@ module_open(Evas_Module *em)
224static void 224static void
225module_close(Evas_Module *em EINA_UNUSED) 225module_close(Evas_Module *em EINA_UNUSED)
226{ 226{
227 eina_log_domain_unregister(_evas_engine_buffer_log_dom); 227 if (_evas_engine_buffer_log_dom >= 0)
228 {
229 eina_log_domain_unregister(_evas_engine_buffer_log_dom);
230 _evas_engine_buffer_log_dom = -1;
231 }
228} 232}
229 233
230static Evas_Module_Api evas_modapi = 234static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/engines/drm/evas_engine.c b/src/modules/evas/engines/drm/evas_engine.c
index d712093..f709592 100644
--- a/src/modules/evas/engines/drm/evas_engine.c
+++ b/src/modules/evas/engines/drm/evas_engine.c
@@ -172,7 +172,11 @@ static void
172module_close(Evas_Module *em EINA_UNUSED) 172module_close(Evas_Module *em EINA_UNUSED)
173{ 173{
174 /* unregister the eina log domain for this engine */ 174 /* unregister the eina log domain for this engine */
175 eina_log_domain_unregister(_evas_engine_drm_log_dom); 175 if (_evas_engine_drm_log_dom >= 0)
176 {
177 eina_log_domain_unregister(_evas_engine_drm_log_dom);
178 _evas_engine_drm_log_dom = -1;
179 }
176 180
177 ecore_shutdown(); 181 ecore_shutdown();
178} 182}
diff --git a/src/modules/evas/engines/eglfs/evas_engine.c b/src/modules/evas/engines/eglfs/evas_engine.c
index c881f29..abd2c4b 100644
--- a/src/modules/evas/engines/eglfs/evas_engine.c
+++ b/src/modules/evas/engines/eglfs/evas_engine.c
@@ -1234,8 +1234,11 @@ static void
1234module_close(Evas_Module *em EINA_UNUSED) 1234module_close(Evas_Module *em EINA_UNUSED)
1235{ 1235{
1236 /* unregister the eina log domain for this engine */ 1236 /* unregister the eina log domain for this engine */
1237 eina_log_domain_unregister(_evas_engine_eglfs_log_dom); 1237 if (_evas_engine_eglfs_log_dom >= 0)
1238 _evas_engine_eglfs_log_dom = -1; 1238 {
1239 eina_log_domain_unregister(_evas_engine_eglfs_log_dom);
1240 _evas_engine_eglfs_log_dom = -1;
1241 }
1239} 1242}
1240 1243
1241static Evas_Module_Api evas_modapi = 1244static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/engines/fb/evas_engine.c b/src/modules/evas/engines/fb/evas_engine.c
index 3156b95..204a614 100644
--- a/src/modules/evas/engines/fb/evas_engine.c
+++ b/src/modules/evas/engines/fb/evas_engine.c
@@ -235,7 +235,11 @@ module_open(Evas_Module *em)
235static void 235static void
236module_close(Evas_Module *em EINA_UNUSED) 236module_close(Evas_Module *em EINA_UNUSED)
237{ 237{
238 eina_log_domain_unregister(_evas_engine_fb_log_dom); 238 if (_evas_engine_fb_log_dom >= 0)
239 {
240 eina_log_domain_unregister(_evas_engine_fb_log_dom);
241 _evas_engine_fb_log_dom = -1;
242 }
239} 243}
240 244
241static Evas_Module_Api evas_modapi = 245static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c b/src/modules/evas/engines/gl_drm/evas_engine.c
index ae19d1a..144dcbd 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -1467,8 +1467,11 @@ static void
1467module_close(Evas_Module *em EINA_UNUSED) 1467module_close(Evas_Module *em EINA_UNUSED)
1468{ 1468{
1469 /* unregister the eina log domain for this engine */ 1469 /* unregister the eina log domain for this engine */
1470 eina_log_domain_unregister(_evas_engine_gl_drm_log_dom); 1470 if (_evas_engine_gl_drm_log_dom >= 0)
1471 _evas_engine_gl_drm_log_dom = -1; 1471 {
1472 eina_log_domain_unregister(_evas_engine_gl_drm_log_dom);
1473 _evas_engine_gl_drm_log_dom = -1;
1474 }
1472 1475
1473 ecore_shutdown(); 1476 ecore_shutdown();
1474} 1477}
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index 899a2a7..8cff9b9 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -3262,7 +3262,11 @@ static void
3262module_close(Evas_Module *em EINA_UNUSED) 3262module_close(Evas_Module *em EINA_UNUSED)
3263{ 3263{
3264 ector_shutdown(); 3264 ector_shutdown();
3265 eina_log_domain_unregister(_evas_engine_GL_log_dom); 3265 if (_evas_engine_GL_log_dom >= 0)
3266 {
3267 eina_log_domain_unregister(_evas_engine_GL_log_dom);
3268 _evas_engine_GL_log_dom = -1;
3269 }
3266 evas_gl_common_module_close(); 3270 evas_gl_common_module_close();
3267} 3271}
3268 3272
diff --git a/src/modules/evas/engines/gl_sdl/evas_engine.c b/src/modules/evas/engines/gl_sdl/evas_engine.c
index 1a43ae5..e722eee 100644
--- a/src/modules/evas/engines/gl_sdl/evas_engine.c
+++ b/src/modules/evas/engines/gl_sdl/evas_engine.c
@@ -423,7 +423,11 @@ module_open(Evas_Module *em)
423static void 423static void
424module_close(Evas_Module *em EINA_UNUSED) 424module_close(Evas_Module *em EINA_UNUSED)
425{ 425{
426 eina_log_domain_unregister(_evas_engine_GL_SDL_log_dom); 426 if (_evas_engine_GL_SDL_log_dom >= 0)
427 {
428 eina_log_domain_unregister(_evas_engine_GL_SDL_log_dom);
429 _evas_engine_GL_SDL_log_dom = -1;
430 }
427} 431}
428 432
429static Evas_Module_Api evas_modapi = 433static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c
index 2d4fde9..49d192e 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -3184,7 +3184,11 @@ module_open(Evas_Module *em)
3184static void 3184static void
3185module_close(Evas_Module *em EINA_UNUSED) 3185module_close(Evas_Module *em EINA_UNUSED)
3186{ 3186{
3187 eina_log_domain_unregister(_evas_engine_GL_X11_log_dom); 3187 if (_evas_engine_GL_X11_log_dom >= 0)
3188 {
3189 eina_log_domain_unregister(_evas_engine_GL_X11_log_dom);
3190 _evas_engine_GL_X11_log_dom = -1;
3191 }
3188} 3192}
3189 3193
3190static Evas_Module_Api evas_modapi = 3194static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/engines/psl1ght/evas_engine.c b/src/modules/evas/engines/psl1ght/evas_engine.c
index 1d9ec1e..be5f808 100644
--- a/src/modules/evas/engines/psl1ght/evas_engine.c
+++ b/src/modules/evas/engines/psl1ght/evas_engine.c
@@ -482,7 +482,11 @@ module_open(Evas_Module *em)
482static void 482static void
483module_close(Evas_Module *em EINA_UNUSED) 483module_close(Evas_Module *em EINA_UNUSED)
484{ 484{
485 eina_log_domain_unregister(_evas_engine_psl1ght_log_dom); 485 if (_evas_engine_psl1ght_log_dom >= 0)
486 {
487 eina_log_domain_unregister(_evas_engine_psl1ght_log_dom);
488 _evas_engine_psl1ght_log_dom = -1;
489 }
486} 490}
487 491
488static Evas_Module_Api evas_modapi = 492static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/engines/software_ddraw/evas_engine.c b/src/modules/evas/engines/software_ddraw/evas_engine.c
index 75b37ba..3d6834c 100644
--- a/src/modules/evas/engines/software_ddraw/evas_engine.c
+++ b/src/modules/evas/engines/software_ddraw/evas_engine.c
@@ -186,7 +186,11 @@ module_open(Evas_Module *em)
186static void 186static void
187module_close(Evas_Module *em EINA_UNUSED) 187module_close(Evas_Module *em EINA_UNUSED)
188{ 188{
189 eina_log_domain_unregister(_evas_log_dom_module); 189 if (_evas_log_dom_module >= 0)
190 {
191 eina_log_domain_unregister(_evas_log_dom_module);
192 _evas_log_dom_module = -1;
193 }
190} 194}
191 195
192static Evas_Module_Api evas_modapi = 196static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/engines/software_gdi/evas_engine.c b/src/modules/evas/engines/software_gdi/evas_engine.c
index d57e92c..be226f7 100644
--- a/src/modules/evas/engines/software_gdi/evas_engine.c
+++ b/src/modules/evas/engines/software_gdi/evas_engine.c
@@ -195,8 +195,11 @@ module_open(Evas_Module *em)
195static void 195static void
196module_close(Evas_Module *em EINA_UNUSED) 196module_close(Evas_Module *em EINA_UNUSED)
197{ 197{
198 eina_log_domain_unregister(_evas_engine_soft_gdi_log_dom); 198 if (_evas_engine_soft_gdi_log_dom >= 0)
199 _evas_engine_soft_gdi_log_dom = -1; 199 {
200 eina_log_domain_unregister(_evas_engine_soft_gdi_log_dom);
201 _evas_engine_soft_gdi_log_dom = -1;
202 }
200} 203}
201 204
202static Evas_Module_Api evas_modapi = 205static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 66a2d0b..baf3e46 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -5878,7 +5878,11 @@ module_close(Evas_Module *em EINA_UNUSED)
5878 eina_mempool_del(_mp_command_font); 5878 eina_mempool_del(_mp_command_font);
5879 eina_mempool_del(_mp_command_map); 5879 eina_mempool_del(_mp_command_map);
5880 eina_mempool_del(_mp_command_ector); 5880 eina_mempool_del(_mp_command_ector);
5881 eina_log_domain_unregister(_evas_soft_gen_log_dom); 5881 if (_evas_soft_gen_log_dom >= 0)
5882 {
5883 eina_log_domain_unregister(_evas_soft_gen_log_dom);
5884 _evas_soft_gen_log_dom = -1;
5885 }
5882} 5886}
5883 5887
5884static Evas_Module_Api evas_modapi = 5888static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/engines/software_x11/evas_engine.c b/src/modules/evas/engines/software_x11/evas_engine.c
index 6ef80b4..fd61bc0 100644
--- a/src/modules/evas/engines/software_x11/evas_engine.c
+++ b/src/modules/evas/engines/software_x11/evas_engine.c
@@ -682,7 +682,11 @@ module_open(Evas_Module *em)
682static void 682static void
683module_close(Evas_Module *em EINA_UNUSED) 683module_close(Evas_Module *em EINA_UNUSED)
684{ 684{
685 eina_log_domain_unregister(_evas_engine_soft_x11_log_dom); 685 if (_evas_engine_soft_x11_log_dom >= 0)
686 {
687 eina_log_domain_unregister(_evas_engine_soft_x11_log_dom);
688 _evas_engine_soft_x11_log_dom = -1;
689 }
686} 690}
687 691
688static Evas_Module_Api evas_modapi = 692static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c
index 94c4316..64bed02 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -1423,7 +1423,11 @@ module_open(Evas_Module *em)
1423static void 1423static void
1424module_close(Evas_Module *em EINA_UNUSED) 1424module_close(Evas_Module *em EINA_UNUSED)
1425{ 1425{
1426 eina_log_domain_unregister(_evas_engine_wl_egl_log_dom); 1426 if (_evas_engine_wl_egl_log_dom >= 0)
1427 {
1428 eina_log_domain_unregister(_evas_engine_wl_egl_log_dom);
1429 _evas_engine_wl_egl_log_dom = -1;
1430 }
1427} 1431}
1428 1432
1429static Evas_Module_Api evas_modapi = 1433static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c
index 1fe45ec..b00c614 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.c
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.c
@@ -415,11 +415,11 @@ module_close(Evas_Module *em EINA_UNUSED)
415 LOGFN(__FILE__, __LINE__, __FUNCTION__); 415 LOGFN(__FILE__, __LINE__, __FUNCTION__);
416 416
417 /* unregister logging domain */ 417 /* unregister logging domain */
418 if (_evas_engine_way_shm_log_dom > -1) 418 if (_evas_engine_way_shm_log_dom >= 0)
419 eina_log_domain_unregister(_evas_engine_way_shm_log_dom); 419 {
420 420 eina_log_domain_unregister(_evas_engine_way_shm_log_dom);
421 /* reset logging domain variable */ 421 _evas_engine_way_shm_log_dom = -1;
422 _evas_engine_way_shm_log_dom = -1; 422 }
423} 423}
424 424
425static Evas_Module_Api evas_modapi = 425static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/image_loaders/ico/evas_image_load_ico.c b/src/modules/evas/image_loaders/ico/evas_image_load_ico.c
index 7645f2a..4f7363d 100644
--- a/src/modules/evas/image_loaders/ico/evas_image_load_ico.c
+++ b/src/modules/evas/image_loaders/ico/evas_image_load_ico.c
@@ -823,7 +823,11 @@ module_open(Evas_Module *em)
823static void 823static void
824module_close(Evas_Module *em EINA_UNUSED) 824module_close(Evas_Module *em EINA_UNUSED)
825{ 825{
826 eina_log_domain_unregister(_evas_loader_ico_log_dom); 826 if (_evas_loader_ico_log_dom >= 0)
827 {
828 eina_log_domain_unregister(_evas_loader_ico_log_dom);
829 _evas_loader_ico_log_dom = -1;
830 }
827} 831}
828 832
829static Evas_Module_Api evas_modapi = 833static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/image_loaders/jp2k/evas_image_load_jp2k.c b/src/modules/evas/image_loaders/jp2k/evas_image_load_jp2k.c
index b20414b..a4ed273 100644
--- a/src/modules/evas/image_loaders/jp2k/evas_image_load_jp2k.c
+++ b/src/modules/evas/image_loaders/jp2k/evas_image_load_jp2k.c
@@ -392,8 +392,11 @@ module_open(Evas_Module *em)
392static void 392static void
393module_close(Evas_Module *em EINA_UNUSED) 393module_close(Evas_Module *em EINA_UNUSED)
394{ 394{
395 eina_log_domain_unregister(_evas_loader_jp2k_log_dom); 395 if (_evas_loader_jp2k_log_dom >= 0)
396 _evas_loader_jp2k_log_dom = -1; 396 {
397 eina_log_domain_unregister(_evas_loader_jp2k_log_dom);
398 _evas_loader_jp2k_log_dom = -1;
399 }
397} 400}
398 401
399static Evas_Module_Api evas_modapi = 402static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/image_loaders/tiff/evas_image_load_tiff.c b/src/modules/evas/image_loaders/tiff/evas_image_load_tiff.c
index 943c3e7..19b9aac 100644
--- a/src/modules/evas/image_loaders/tiff/evas_image_load_tiff.c
+++ b/src/modules/evas/image_loaders/tiff/evas_image_load_tiff.c
@@ -359,7 +359,11 @@ module_open(Evas_Module *em)
359static void 359static void
360module_close(Evas_Module *em EINA_UNUSED) 360module_close(Evas_Module *em EINA_UNUSED)
361{ 361{
362 eina_log_domain_unregister(_evas_loader_tiff_log_dom); 362 if (_evas_loader_tiff_log_dom >= 0)
363 {
364 eina_log_domain_unregister(_evas_loader_tiff_log_dom);
365 _evas_loader_tiff_log_dom = -1;
366 }
363} 367}
364 368
365static Evas_Module_Api evas_modapi = 369static Evas_Module_Api evas_modapi =
diff --git a/src/modules/evas/image_loaders/xpm/evas_image_load_xpm.c b/src/modules/evas/image_loaders/xpm/evas_image_load_xpm.c
index cf9b9df..4957956 100644
--- a/src/modules/evas/image_loaders/xpm/evas_image_load_xpm.c
+++ b/src/modules/evas/image_loaders/xpm/evas_image_load_xpm.c
@@ -726,7 +726,11 @@ module_close(Evas_Module *em EINA_UNUSED)
726 eina_file_close(rgb_txt); 726 eina_file_close(rgb_txt);
727 rgb_txt = NULL; 727 rgb_txt = NULL;
728 } 728 }
729 eina_log_domain_unregister(_evas_loader_xpm_log_dom); 729 if (_evas_loader_xpm_log_dom >= 0)
730 {
731 eina_log_domain_unregister(_evas_loader_xpm_log_dom);
732 _evas_loader_xpm_log_dom = -1;
733 }
730} 734}
731 735
732static Evas_Module_Api evas_modapi = 736static Evas_Module_Api evas_modapi =