Add dlogs for debug 23/286223/1
authorJihoon Jung <jh8801.jung@samsung.com>
Mon, 2 Jan 2023 05:52:46 +0000 (14:52 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Mon, 2 Jan 2023 05:54:43 +0000 (14:54 +0900)
Change-Id: I9c9afd3145cac161145889412cebc92740566c35
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
src/daemon/mtp_daemon.c
src/daemon/mtp_daemon_controller.c
src/daemon/mtp_daemon_event.c

index 7e704419b4ad36cbfad7ab06dd61b8b81f5c4e97..8258de004e8016ed0a279b4dc9064a6424bd84cf 100644 (file)
@@ -82,17 +82,23 @@ static mtp_error_e __daemon_deinitalize(mtp_context *mtp_ctx)
                return ret;
 
        if (mtp_ctx->c_thread != NULL) {
+               MTP_LOGI("controller thread join start");
                g_thread_join(mtp_ctx->c_thread);
                g_thread_unref(mtp_ctx->c_thread);
+               MTP_LOGI("controller thread join end");
        }
 
        if (mtp_ctx->usb_event_thread != NULL) {
+               MTP_LOGI("usb event thread join start");
                g_thread_join(mtp_ctx->usb_event_thread);
                g_thread_unref(mtp_ctx->usb_event_thread);
+               MTP_LOGI("usb event thread join end");
        }
 
-       if (mtp_ctx->usb_ctx != NULL)
+       if (mtp_ctx->usb_ctx != NULL) {
+               MTP_LOGI("call libusb_exit");
                libusb_exit(mtp_ctx->usb_ctx);
+       }
 
        g_main_loop_unref(mtp_ctx->main_loop);
        g_free(mtp_ctx);
@@ -179,6 +185,7 @@ int main(int argc, char *argv[])
        g_main_loop_run(mtp_ctx->main_loop);
 
 EXIT:
+       MTP_LOGI("mtp initiator exit process start"); //LCOV_EXCL_LINE
        if (mtp_ctx != NULL && mtp_ctx->device_list != NULL
                && mtp_ctx->device_list->threads != NULL) {
                g_thread_pool_free(mtp_ctx->device_list->threads, true, true);
index 61fd8215dd85886fe37e64a2fe97d5a068c73fae..87712c3e2924f246666640680387e3b5c49f648f 100755 (executable)
@@ -55,6 +55,8 @@ static gpointer _controller_thread(gpointer user_data)
                }
        }
 
+       MTP_LOGI("Exit controller thread");
+
        g_thread_exit(NULL); //LCOV_EXCL_LINE
 
        return NULL; //LCOV_EXCL_LINE
index b9669dbdf4da774faa85668426ba2d9e10101c84..7121d8f209e788b2ef87c5dd475d542e8e3fd082 100755 (executable)
@@ -350,6 +350,8 @@ static gpointer __dispatch_event(gpointer user_data)
                libusb_handle_events_completed(mtp_ctx->usb_ctx, NULL);
        }
 
+       MTP_LOGI("Exit dispatch thread");
+
        g_thread_exit(NULL);
 
        return NULL;