Revise unnecessary logs, remove build warnings
[platform/core/multimedia/libmm-sound.git] / focus_server / mm_sound_mgr_focus_socket.c
index 8075892..bf12efa 100644 (file)
@@ -144,7 +144,7 @@ static void *thread_func(void *data)
        char ret_buf[MAX_ERROR_LEN] = {'\0',};
 
        if (data == NULL) {
-               debug_error("invalid data\n");
+               debug_error("invalid data");
                pthread_exit(NULL);
        }
 
@@ -173,9 +173,9 @@ static void *thread_func(void *data)
                        debug_error("failed to read(), err: %s", str_error);
                } else if (rval == sizeof(_mm_sound_mgr_focus_socket_param_t)) {
                        int ret = MM_ERROR_NONE;
-                       debug_log("data read successfully..\n");
-                       debug_log(" : pid[%d], handle_id[%d], focus_type[%d]\n", read_data.pid, read_data.handle_id, read_data.focus_type);
-                       debug_log(" : option[%d], ext_info[%s], is_for_session[%d]\n", read_data.option, read_data.ext_info, read_data.is_for_session);
+                       debug_log("data read successfully..");
+                       debug_log(" : pid[%d], handle_id[%d], focus_type[%d]", read_data.pid, read_data.handle_id, read_data.focus_type);
+                       debug_log(" : option[%d], ext_info[%s], is_for_session[%d]", read_data.option, read_data.ext_info, read_data.is_for_session);
 
                        if ((ret = focus_functions_handler(&read_data)))
                                debug_log("failed to focus_function_handler(), err[0x%x]", ret);
@@ -183,7 +183,7 @@ static void *thread_func(void *data)
                        snprintf(ret_buf, sizeof(ret_buf), "%s", convert_error_string_from_int(ret));
                        if (write(accepted_fd, ret_buf, sizeof(ret_buf)) < 0) {
                                strerror_r(errno, str_error, sizeof(str_error));
-                               debug_error("failed to write(), err: %s\n", str_error);
+                               debug_error("failed to write(), err: %s", str_error);
                        }
                } else {
                        debug_error("failed to read(), read size mismatched, rval(%d), expect size(%d)", rval,sizeof(_mm_sound_mgr_focus_socket_param_t));
@@ -204,14 +204,14 @@ int MMSoundMgrFocusSocketInit(int *fd)
        char str_error[128] = {'\0',};
 
        if (fd == NULL) {
-               debug_error("input param fd is null\n");
+               debug_error("input param fd is null");
                return MM_ERROR_INVALID_ARGUMENT;
        }
 
        socket_fd = socket(AF_UNIX, SOCK_STREAM, 0);
        if (socket_fd < 0) {
                strerror_r(errno, str_error, sizeof(str_error));
-               debug_error("failed to socket(), err: %s\n", str_error);
+               debug_error("failed to socket(), err: %s", str_error);
                return MM_ERROR_SOUND_INTERNAL;
        }
 
@@ -223,13 +223,13 @@ int MMSoundMgrFocusSocketInit(int *fd)
 
        if (bind(socket_fd, (struct sockaddr *)&addr_un, sizeof(addr_un))) {
                strerror_r(errno, str_error, sizeof(str_error));
-               debug_error("failed to bind(), err: %s\n", str_error);
+               debug_error("failed to bind(), err: %s", str_error);
                if (errno == EADDRINUSE) {
                        unlink(FOCUS_SERVER_SOCK);
-                       debug_msg("unlink socket and bind again...\n");
+                       debug_msg("unlink socket and bind again...");
                        if (bind(socket_fd, (struct sockaddr *)&addr_un, sizeof(addr_un))) {
                                strerror_r(errno, str_error, sizeof(str_error));
-                               debug_error("failed to bind() again, err: %s\n", str_error);
+                               debug_error("failed to bind() again, err: %s", str_error);
                                close(socket_fd);
                                return MM_ERROR_SOUND_INTERNAL;
                        }
@@ -269,11 +269,11 @@ int MMSoundMgrFocusSocketReadyToWork(int fd)
        debug_enter();
 
        if (fd < 0) {
-               debug_error("input param fd [%d] is not valid\n", fd);
+               debug_error("input param fd [%d] is not valid", fd);
                return MM_ERROR_INVALID_ARGUMENT;
        }
 
-       debug_log("fd [%d]\n", fd);
+       debug_log("fd [%d]", fd);
        if (pthread_create(&g_focus_work_thread_id, NULL, (void *)thread_func, (void *)fd)) {
                debug_error("failed to start work thread");
                return MM_ERROR_SOUND_INTERNAL;