aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-04 21:40:54 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-04 21:40:54 +0000
commita3df7ad6e7a7008d491c6d831368b5b16f8bf088 (patch)
tree8e31c9e0baa5bc3ba88d67dbe5885df591464448 /main
parentea6c02b74f3c9c8ffa83144ed3554a9b577cf74b (diff)
It's pretty difficult to pthread_kill a thread that doesn't exist. (issue #8681 reported by bkruse)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49525 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/manager.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/main/manager.c b/main/manager.c
index 116c5b292..8f6ad5d7e 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -109,7 +109,6 @@ static int displayconnects = 1;
static int timestampevents;
static int httptimeout = 60;
-static pthread_t accept_thread_ptr; /*!< the accept thread */
static int block_sockets;
static int num_sessions;
@@ -640,10 +639,8 @@ static struct ast_cli_entry cli_manager[] = {
*/
static struct eventqent *unref_event(struct eventqent *e)
{
- struct eventqent *ret = AST_LIST_NEXT(e, eq_next);
- if (ast_atomic_dec_and_test(&e->usecount) && ret)
- pthread_kill(accept_thread_ptr, SIGURG);
- return ret;
+ ast_atomic_fetchadd_int(&e->usecount, -1);
+ return AST_LIST_NEXT(e, eq_next);
}
static void ref_event(struct eventqent *e)