mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Fix agent deadlock and remove braindead tags dependency
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
8
Makefile
8
Makefile
@@ -118,7 +118,7 @@ DEBUG=-g #-pg
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
# Optional debugging parameters
|
# Optional debugging parameters
|
||||||
DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH #-DDETECT_DEADLOCKS
|
DEBUG_THREADS = -DDEBUG_THREADS #-DDO_CRASH #-DDETECT_DEADLOCKS
|
||||||
|
|
||||||
# Uncomment next one to enable ast_frame tracing (for debugging)
|
# Uncomment next one to enable ast_frame tracing (for debugging)
|
||||||
TRACE_FRAMES = #-DTRACE_FRAMES
|
TRACE_FRAMES = #-DTRACE_FRAMES
|
||||||
@@ -294,9 +294,9 @@ _all: all
|
|||||||
|
|
||||||
all: cleantest depend asterisk subdirs
|
all: cleantest depend asterisk subdirs
|
||||||
|
|
||||||
ifneq ($(wildcard tags),)
|
#ifneq ($(wildcard tags),)
|
||||||
all: tags
|
ctags: tags
|
||||||
endif
|
#endif
|
||||||
|
|
||||||
ifneq ($(wildcard TAGS),)
|
ifneq ($(wildcard TAGS),)
|
||||||
all: TAGS
|
all: TAGS
|
||||||
|
@@ -705,14 +705,12 @@ static int agent_hangup(struct ast_channel *ast)
|
|||||||
snprintf(agent, sizeof(agent), "Agent/%s", p->agent);
|
snprintf(agent, sizeof(agent), "Agent/%s", p->agent);
|
||||||
ast_queue_log("NONE", ast->uniqueid, agent, "AGENTCALLBACKLOGOFF", "%s|%ld|%s", p->loginchan, logintime, "Autologoff");
|
ast_queue_log("NONE", ast->uniqueid, agent, "AGENTCALLBACKLOGOFF", "%s|%ld|%s", p->loginchan, logintime, "Autologoff");
|
||||||
p->loginchan[0] = '\0';
|
p->loginchan[0] = '\0';
|
||||||
ast_device_state_changed("Agent/%s", p->agent);
|
|
||||||
}
|
}
|
||||||
} else if (p->dead) {
|
} else if (p->dead) {
|
||||||
ast_mutex_lock(&p->chan->lock);
|
ast_mutex_lock(&p->chan->lock);
|
||||||
ast_softhangup(p->chan, AST_SOFTHANGUP_EXPLICIT);
|
ast_softhangup(p->chan, AST_SOFTHANGUP_EXPLICIT);
|
||||||
ast_mutex_unlock(&p->chan->lock);
|
ast_mutex_unlock(&p->chan->lock);
|
||||||
} else {
|
} else {
|
||||||
ast_device_state_changed("Agent/%s", p->agent);
|
|
||||||
ast_mutex_lock(&p->chan->lock);
|
ast_mutex_lock(&p->chan->lock);
|
||||||
ast_moh_start(p->chan, p->moh);
|
ast_moh_start(p->chan, p->moh);
|
||||||
ast_mutex_unlock(&p->chan->lock);
|
ast_mutex_unlock(&p->chan->lock);
|
||||||
@@ -734,6 +732,7 @@ static int agent_hangup(struct ast_channel *ast)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ast_mutex_unlock(&p->lock);
|
ast_mutex_unlock(&p->lock);
|
||||||
|
ast_device_state_changed("Agent/%s", p->agent);
|
||||||
|
|
||||||
if (p->pending) {
|
if (p->pending) {
|
||||||
ast_mutex_lock(&agentlock);
|
ast_mutex_lock(&agentlock);
|
||||||
|
Reference in New Issue
Block a user