Change LIBMTP log level to ALL 68/315568/1 accepted/tizen/unified/20241204.183308
authorJihoon Jung <jh8801.jung@samsung.com>
Tue, 3 Dec 2024 06:33:34 +0000 (15:33 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Tue, 3 Dec 2024 06:33:34 +0000 (15:33 +0900)
Change-Id: I635d7d84908615303cce0240d6616a0e94d91cc8
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
src/daemon/mtp_daemon_event.c
src/daemon/mtp_daemon_gdbus_manager.c

index 83d3774965bf0ea46d71eb691dce8e032083b749..e31ff6657daba02f814c6d8960daf716c0c18615 100644 (file)
@@ -265,6 +265,7 @@ mtp_error_e __device_list_init(mtp_context *mtp_ctx)
 
        RETV_IF(mtp_ctx == NULL, MTP_ERROR_INVALID_PARAMETER);
 
+       LIBMTP_Set_Debug(LIBMTP_DEBUG_ALL);
        LIBMTP_Init();
        LIBMTP_Detect_Raw_Devices(&rawdevices, &numrawdevices);
 
index 32629043e8d47bf146c502cfcb13083fbb7ed381..2d958998eef5bca379a42c1ebf75fec4cc14ac23 100644 (file)
@@ -347,8 +347,9 @@ static void __manager_get_object_thread_func(gpointer user_data)
                        result = MTP_ERROR_IO_ERROR;
                        /* LCOV_EXCL_STOP */
                } else {
+                       LIBMTP_Set_Debug(LIBMTP_DEBUG_PTP);
                        ret = LIBMTP_Get_File_To_File_Descriptor(device, object_handle, fd, NULL, NULL);
-
+                       LIBMTP_Set_Debug(LIBMTP_DEBUG_ALL);
                        if (ret != 0) {
                                /* LCOV_EXCL_START */
                                MTP_LOGE("get descriptor fail - ret: %d", ret);
@@ -426,7 +427,9 @@ static void __manager_get_partial_object_thread_func(gpointer user_data)
                        result = MTP_ERROR_IO_ERROR;
                        /* LCOV_EXCL_STOP */
                } else {
+                       LIBMTP_Set_Debug(LIBMTP_DEBUG_PTP);
                        ret = LIBMTP_GetPartialObject(device, object_handle, (uint32_t)offset, (uint32_t)max_bytes, &data, &actual_written);
+                       LIBMTP_Set_Debug(LIBMTP_DEBUG_ALL);
 
                        if (ret == 0) {
                                /* LCOV_EXCL_START */
@@ -509,8 +512,9 @@ static void __manager_get_thumbnail_thread_func(gpointer user_data)
                        /* LCOV_EXCL_STOP */
                } else {
                        MTP_LOGI("get thumbnail start. object_handle : %d, dest_path : %s", object_handle, dest_path);
+                       LIBMTP_Set_Debug(LIBMTP_DEBUG_PTP);
                        ret = LIBMTP_Get_Thumbnail(device, object_handle, &thumb_data, &thumb_size);
-
+                       LIBMTP_Set_Debug(LIBMTP_DEBUG_ALL);
                        if (ret == 0) {
                                MTP_LOGI("get thumbnail end. thumb_size : %d", thumb_size);
                                ret = write(fd, thumb_data, thumb_size);