mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +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 timestampevents;
|
||||||
static int httptimeout = 60;
|
static int httptimeout = 60;
|
||||||
|
|
||||||
static pthread_t accept_thread_ptr; /*!< the accept thread */
|
|
||||||
static int block_sockets;
|
static int block_sockets;
|
||||||
static int num_sessions;
|
static int num_sessions;
|
||||||
|
|
||||||
@@ -640,10 +639,8 @@ static struct ast_cli_entry cli_manager[] = {
|
|||||||
*/
|
*/
|
||||||
static struct eventqent *unref_event(struct eventqent *e)
|
static struct eventqent *unref_event(struct eventqent *e)
|
||||||
{
|
{
|
||||||
struct eventqent *ret = AST_LIST_NEXT(e, eq_next);
|
ast_atomic_fetchadd_int(&e->usecount, -1);
|
||||||
if (ast_atomic_dec_and_test(&e->usecount) && ret)
|
return AST_LIST_NEXT(e, eq_next);
|
||||||
pthread_kill(accept_thread_ptr, SIGURG);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ref_event(struct eventqent *e)
|
static void ref_event(struct eventqent *e)
|
||||||
|
Reference in New Issue
Block a user