From: Jaroslav Kysela Date: Sun, 7 Jan 2018 16:18:11 +0000 (+0100) Subject: cclient: use id in the thread name X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fe3ebd4864d3d7980a6334b75878297005dc95a;p=thirdparty%2Ftvheadend.git cclient: use id in the thread name --- diff --git a/src/descrambler/cclient.c b/src/descrambler/cclient.c index 25ab4588a..17790881d 100644 --- a/src/descrambler/cclient.c +++ b/src/descrambler/cclient.c @@ -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);