From 298e38eb0a19efa15e474ab82a5873918a4edac3 Mon Sep 17 00:00:00 2001 From: Pavel Rochnyack Date: Tue, 12 Mar 2019 22:51:33 +0700 Subject: [PATCH] virt plugin: Changed place of event loop start/stop debug messages output --- src/virt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/virt.c b/src/virt.c index 00227dd8..214ddace 100644 --- a/src/virt.c +++ b/src/virt.c @@ -2055,6 +2055,8 @@ static int start_event_loop(virt_notif_thread_t *thread_data) { return -1; } + DEBUG(PLUGIN_NAME " plugin: starting event loop"); + virt_notif_thread_set_active(thread_data, 1); if (pthread_create(&thread_data->event_loop_tid, NULL, event_loop_worker, thread_data)) { @@ -2070,6 +2072,9 @@ static int start_event_loop(virt_notif_thread_t *thread_data) { /* stop event loop thread and deregister callback */ static void stop_event_loop(virt_notif_thread_t *thread_data) { + + DEBUG(PLUGIN_NAME " plugin: stopping event loop"); + /* Stopping loop */ if (virt_notif_thread_is_active(thread_data)) { virt_notif_thread_set_active(thread_data, 0); @@ -2312,8 +2317,6 @@ static int lv_init(void) { if (lv_connect() != 0) return -1; - DEBUG(PLUGIN_NAME " plugin: starting event loop"); - if (!persistent_notification) { virt_notif_thread_init(¬if_thread); if (start_event_loop(¬if_thread) != 0) @@ -2822,8 +2825,6 @@ static int lv_shutdown(void) { lv_fini_instance(i); } - DEBUG(PLUGIN_NAME " plugin: stopping event loop"); - if (!persistent_notification) stop_event_loop(¬if_thread); -- 2.11.0