mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
It's pretty difficult to pthread_kill a thread that doesn't exist. (issue #8681 reported by bkruse)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user