From 3b9913ee716bb4f5183e5062e3d2dc4536e6dc2a Mon Sep 17 00:00:00 2001 From: Nathan Bryant Date: Sat, 11 Mar 2000 05:08:48 +0000 Subject: [PATCH] * commands.c: oops, that mutex stuff wasn't necessary --- citadel/ChangeLog | 4 ++++ citadel/commands.c | 7 ------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 47825a457..e6f48807c 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 1.483 2000/03/11 05:08:48 nbryant + * commands.c: oops, that mutex stuff wasn't necessary + Revision 1.482 2000/03/11 04:09:03 nbryant * new threaded client code for background keepalives @@ -1714,3 +1717,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/commands.c b/citadel/commands.c index af29a10df..7beb8f7b3 100644 --- a/citadel/commands.c +++ b/citadel/commands.c @@ -154,7 +154,6 @@ static void really_do_keepalive(void) { #ifdef THREADED_CLIENT static pthread_t ka_thr_handle; static int ka_thr_active = 0; -static pthread_mutex_t ka_thr_mutex = PTHREAD_MUTEX_INITIALIZER; static int async_ka_enabled = 0; static void *ka_thread(void *arg) @@ -168,11 +167,6 @@ static void *ka_thread(void *arg) /* start up a thread to handle a keepalive in the background */ static void async_ka_exec(void) { - if (ka_thr_active) - return; - - pthread_mutex_lock(&ka_thr_mutex); - if (!ka_thr_active) { ka_thr_active = 1; if (pthread_create(&ka_thr_handle, NULL, ka_thread, NULL)) { @@ -180,7 +174,6 @@ static void async_ka_exec(void) exit(1); } } - pthread_mutex_unlock(&ka_thr_mutex); } #endif /* THREADED_CLIENT */ -- 2.39.2