X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fvirt.c;h=9f87d2c24b85c9cc03c638e72a837fbe3940d345;hb=b59f84fe42dd6152bf1afe060554284c1f7f054f;hp=37853852108448bd3e9c934ad353c627391573de;hpb=38e94dcc796e5d00088826ffd5d43ca5a2e590a2;p=collectd.git diff --git a/src/virt.c b/src/virt.c index 37853852..9f87d2c2 100644 --- a/src/virt.c +++ b/src/virt.c @@ -1898,7 +1898,9 @@ static int virt_notif_thread_init(virt_notif_thread_t *thread_data) { * domain_event_cb_id to '-1' */ thread_data->domain_event_cb_id = -1; - thread_data->is_active = 0; + pthread_mutex_lock(&thread_data->active_mutex); + thread_data->is_active = false; + pthread_mutex_unlock(&thread_data->active_mutex); return 0; }