Remove dlog prints on signal handler / dotnet cleanup 65/164665/1
authorSeungbae Shin <seungbae.shin@samsung.com>
Fri, 15 Dec 2017 04:40:14 +0000 (13:40 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Wed, 20 Dec 2017 08:12:42 +0000 (17:12 +0900)
[Version] 0.12.6
[Issue Type] Enhancement

Change-Id: Ib73de0cbd07d3648d4aa500a9a2d8f5ea1670275

common/mm_sound_dbus.c
mm_sound.c
mm_sound_client.c
mm_sound_proxy.c
packaging/libmm-sound.spec

index bb18bc5..57b88ef 100644 (file)
@@ -323,12 +323,18 @@ static GDBusConnection * _dbus_get_connection(GBusType bustype)
 
        if (bustype == G_BUS_TYPE_SYSTEM) {
                if (conn_system) {
+#ifndef TIZEN_TV
                        debug_log("Already connected to system bus");
+#endif
                } else {
+#ifndef TIZEN_TV
                        debug_log("Get new connection on system bus");
+#endif
                        conn_system = g_bus_get_sync(bustype, NULL, &err);
                        if (!conn_system || err) {
+#ifndef TIZEN_TV
                                debug_error("g_dbus_get_sync() error (%s)", err ? err->message : NULL);
+#endif
                                g_error_free(err);
                                return NULL;
                        }
@@ -336,19 +342,27 @@ static GDBusConnection * _dbus_get_connection(GBusType bustype)
                return conn_system;
        } else if (bustype == G_BUS_TYPE_SESSION) {
                if (conn_session) {
+#ifndef TIZEN_TV
                        debug_log("Already connected to session bus");
+#endif
                } else {
+#ifndef TIZEN_TV
                        debug_log("Get new connection on session bus");
+#endif
                        conn_session = g_bus_get_sync(bustype, NULL, &err);
                        if (!conn_session || err) {
+#ifndef TIZEN_TV
                                debug_error("g_dbus_get_sync() error (%s)", err ? err->message : NULL);
+#endif
                                g_error_free(err);
                                return NULL;
                        }
                }
                return conn_session;
        } else {
+#ifndef TIZEN_TV
                debug_error("Invalid bus type");
+#endif
                return NULL;
        }
 
@@ -506,12 +520,16 @@ int mm_sound_dbus_emit_signal(audio_provider_t provider, audio_event_t event, GV
        gboolean dbus_ret;
 
        if (event >= AUDIO_EVENT_MAX) {
+#ifndef TIZEN_TV
                debug_error("emit signal failed, invalid argument, event_type(%d)", event);
+#endif
                return MM_ERROR_INVALID_ARGUMENT;
        }
 
        if (!(conn = _dbus_get_connection(G_BUS_TYPE_SYSTEM))) {
+#ifndef TIZEN_TV
                debug_error("Get Dbus Connection Error");
+#endif
                return MM_ERROR_SOUND_INTERNAL;
        }
 
@@ -520,13 +538,17 @@ int mm_sound_dbus_emit_signal(audio_provider_t provider, audio_event_t event, GV
                                                  g_paths[provider].interface, g_events[event].name,
                                                  param, &err);
        if (!dbus_ret || err) {
+#ifndef TIZEN_TV
                debug_error("g_dbus_connection_emit_signal() error (%s)", err ? err->message : NULL);
+#endif
                g_error_free(err);
                return MM_ERROR_SOUND_INTERNAL;
        }
        g_dbus_connection_flush_sync(conn, NULL, NULL);
 
+#ifndef TIZEN_TV
        debug_msg("emit signal for [%s] success", g_events[event].name);
+#endif
        return MM_ERROR_NONE;
 }
 
index e0a5553..4323981 100644 (file)
@@ -842,9 +842,7 @@ int mm_sound_get_signal_value(mm_sound_signal_name_t signal_type, int *value)
 EXPORT_API
 void mm_sound_dotnet_cleanup(int signo)
 {
-       debug_warning("Dotnet cleanup %d : Start", signo);
        mm_sound_client_cleanup();
-       debug_warning("Dotnet cleanup %d : End", signo);
 }
 #endif
 
index cda4d91..30afb7b 100644 (file)
@@ -148,22 +148,29 @@ typedef struct _focus_idle_event {
 
 void mm_sound_client_cleanup(void)
 {
+#ifndef TIZEN_TV
        int ret = MM_ERROR_NONE;
 
        if (g_need_emergent_exit) {
                ret = mm_sound_proxy_emergent_exit(getpid());
                if (ret == MM_ERROR_NONE)
-                       debug_msg("Success to emergnet_exit");
+                       debug_msg("Success to emergent_exit");
                else
                        debug_error("Error occurred : 0x%x", ret);
        }
+#else
+       if (g_need_emergent_exit)
+               mm_sound_proxy_emergent_exit(getpid());
+#endif
 }
 
 void _system_signal_handler(int signo, siginfo_t *siginfo, void *context)
 {
        sigset_t old_mask, all_mask;
 
+#ifndef TIZEN_TV
        debug_warning("Got signal : signo(%d)", signo);
+#endif
 
        /* signal block */
 
@@ -216,7 +223,9 @@ void _system_signal_handler(int signo, siginfo_t *siginfo, void *context)
                break;
        }
 
+#ifndef TIZEN_TV
        debug_warning("signal handling end");
+#endif
 }
 
 #ifdef TIZEN_TV
index 6de58a6..be5aec6 100644 (file)
@@ -1019,22 +1019,30 @@ int mm_sound_proxy_emergent_exit(int exit_pid)
        int ret = MM_ERROR_NONE;
        GVariant *params = NULL;
 
+#ifndef TIZEN_TV
        debug_fenter();
+#endif
 
        params = g_variant_new("(i)", exit_pid);
        if (params) {
                if ((ret = mm_sound_dbus_emit_signal(AUDIO_PROVIDER_AUDIO_CLIENT, AUDIO_EVENT_EMERGENT_EXIT, params)) != MM_ERROR_NONE) {
+#ifndef TIZEN_TV
                        debug_error("dbus emergent exit failed");
+#endif
                        goto cleanup;
                }
        } else {
+#ifndef TIZEN_TV
                debug_error("Construct Param for emergent exit signal failed");
+#endif
                ret = MM_ERROR_SOUND_INTERNAL;
        }
 
 cleanup:
 
+#ifndef TIZEN_TV
        debug_fleave();
+#endif
        return ret;
 }
 
index f309577..ef3a4c1 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.12.5
+Version:    0.12.6
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0