]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
cclient: use id in the thread name
authorJaroslav Kysela <perex@perex.cz>
Sun, 7 Jan 2018 16:18:11 +0000 (17:18 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 7 Jan 2018 16:18:11 +0000 (17:18 +0100)
src/descrambler/cclient.c

index 25ab4588aaafbe528f588a9d402da717eb77270d..17790881d302bf128300b17ac92048560c23eeab 100644 (file)
@@ -1190,6 +1190,7 @@ cc_conf_changed(caclient_t *cac)
   cclient_t *cc = (cclient_t *)cac;
   pthread_t tid;
   cc_message_t *cm;
+  char tname[32];
 
   if (cac->cac_enabled) {
     if (cc->cc_hostname == NULL || cc->cc_hostname[0] == '\0') {
@@ -1199,7 +1200,8 @@ cc_conf_changed(caclient_t *cac)
     if (!cc->cc_running) {
       cc->cc_running = 1;
       tvh_pipe(O_NONBLOCK, &cc->cc_pipe);
-      tvhthread_create(&cc->cc_tid, NULL, cc_thread, cc, "cc");
+      snprintf(tname, sizeof(tname), "cc-%s", cc->cc_id);
+      tvhthread_create(&cc->cc_tid, NULL, cc_thread, cc, tname);
       return;
     }
     pthread_mutex_lock(&cc->cc_mutex);