projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
534d17b
)
virt plugin: Changed place of event loop start/stop debug messages output
author
Pavel Rochnyack
<pavel2000@ngs.ru>
Tue, 12 Mar 2019 15:51:33 +0000
(22:51 +0700)
committer
Pavel Rochnyack
<pavel2000@ngs.ru>
Tue, 12 Mar 2019 15:51:33 +0000
(22:51 +0700)
src/virt.c
patch
|
blob
|
history
diff --git
a/src/virt.c
b/src/virt.c
index
00227dd
..
214ddac
100644
(file)
--- 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;
}
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)) {
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) {
/* 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);
/* 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;
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)
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);
}
lv_fini_instance(i);
}
- DEBUG(PLUGIN_NAME " plugin: stopping event loop");
-
if (!persistent_notification)
stop_event_loop(¬if_thread);
if (!persistent_notification)
stop_event_loop(¬if_thread);