diff options
Diffstat (limited to 'ct_server.c')
-rw-r--r-- | ct_server.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ct_server.c b/ct_server.c index eb53bd3..9737ffd 100644 --- a/ct_server.c +++ b/ct_server.c @@ -448,21 +448,19 @@ static void *worker(void *self) int fd, old_state; ssize_t ret; size_t blen = TUNBUFF_SIZ; //FIXME - const struct worker_struct *ws = self; + struct worker_struct *ws = self; struct pollfd fds; char *buff; fds.fd = ws->efd[0]; fds.events = POLLIN; - curve25519_alloc_or_maybe_die(ws->c); - + ws->c = curve25519_tfm_alloc(); buff = xmalloc_aligned(blen, 64); syslog(LOG_INFO, "curvetun thread on CPU%u up!\n", ws->cpu); - pthread_cleanup_push(xfree_func, ws->c); - pthread_cleanup_push(curve25519_free, ws->c); + pthread_cleanup_push(curve25519_tfm_free_void, ws->c); pthread_cleanup_push(xfree_func, buff); while (likely(!sigint)) { @@ -490,7 +488,6 @@ static void *worker(void *self) pthread_cleanup_pop(1); pthread_cleanup_pop(1); - pthread_cleanup_pop(1); pthread_exit((void *) ((long) ws->cpu)); } |