ovs_events: fix using of plugin_thread_create ()
[collectd.git] / src / utils_ovs.c
index 2b14849..ff2b151 100644 (file)
@@ -918,7 +918,8 @@ static int ovs_db_event_thread_init(ovs_db_t *pdb) {
   }
   /* start event thread */
   pthread_t tid;
-  if (plugin_thread_create(&tid, NULL, ovs_event_worker, pdb) != 0) {
+  if (plugin_thread_create(&tid, NULL, ovs_event_worker, pdb,
+                           "utils_ovs:event") != 0) {
     pthread_mutex_unlock(&pdb->event_thread.mutex);
     pthread_mutex_destroy(&pdb->event_thread.mutex);
     pthread_cond_destroy(&pdb->event_thread.cond);
@@ -957,7 +958,8 @@ static int ovs_db_poll_thread_init(ovs_db_t *pdb) {
   /* start poll thread */
   pthread_t tid;
   pdb->poll_thread.state = OVS_DB_POLL_STATE_RUNNING;
-  if (plugin_thread_create(&tid, NULL, ovs_poll_worker, pdb) != 0) {
+  if (plugin_thread_create(&tid, NULL, ovs_poll_worker, pdb,
+                           "utils_ovs:poll") != 0) {
     pthread_mutex_destroy(&pdb->poll_thread.mutex);
     return (-1);
   }