X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=dtls.c;fp=dtls.c;h=8be677eaf8d23a99751ff520c22518bda91aeb99;hb=55ca280f16473095380e22c574910f106b11058f;hp=37721131ec9ef95d953916ecd9981bdd9a21d040;hpb=05b360612d4f1bb48caedc766ede2109024bdc6f;p=libradsec.git diff --git a/dtls.c b/dtls.c index 3772113..8be677e 100644 --- a/dtls.c +++ b/dtls.c @@ -309,7 +309,7 @@ void dtlsserverrd(struct client *client) { debug(DBG_DBG, "dtlsserverrd: starting for %s", addr2string(client->addr)); - if (pthread_create(&dtlsserverwrth, NULL, dtlsserverwr, (void *)client)) { + if (pthread_create(&dtlsserverwrth, &pthread_attr, dtlsserverwr, (void *)client)) { debug(DBG_ERR, "dtlsserverrd: pthread_create failed"); return; } @@ -512,7 +512,7 @@ void *udpdtlsserverrd(void *arg) { if (udp2bio(s, params->sesscache->rbios, cnt)) { debug(DBG_DBG, "udpdtlsserverrd: got DTLS in UDP from %s", addr2string((struct sockaddr *)&from)); - if (!pthread_create(&dtlsserverth, NULL, dtlsservernew, (void *)params)) { + if (!pthread_create(&dtlsserverth, &pthread_attr, dtlsservernew, (void *)params)) { pthread_detach(dtlsserverth); cacheexpire(sessioncache, &lastexpiry); continue; @@ -701,10 +701,10 @@ void initextradtls() { } if (client4_sock >= 0) - if (pthread_create(&cl4th, NULL, udpdtlsclientrd, (void *)&client4_sock)) + if (pthread_create(&cl4th, &pthread_attr, udpdtlsclientrd, (void *)&client4_sock)) debugx(1, DBG_ERR, "pthread_create failed"); if (client6_sock >= 0) - if (pthread_create(&cl6th, NULL, udpdtlsclientrd, (void *)&client6_sock)) + if (pthread_create(&cl6th, &pthread_attr, udpdtlsclientrd, (void *)&client6_sock)) debugx(1, DBG_ERR, "pthread_create failed"); } #else