mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 08:11:21 +00:00
Simplified dahdi_request() channel selection failed reason/cause code.
Also avoid potential crash because cause could be NULL. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -649,17 +649,11 @@ struct ast_channel * analog_request(struct analog_pvt *p, int *callwait, const s
|
||||
return analog_new_ast_channel(p, AST_STATE_RESERVED, 0, p->owner ? ANALOG_SUB_CALLWAIT : ANALOG_SUB_REAL, requestor);
|
||||
}
|
||||
|
||||
int analog_available(struct analog_pvt *p, int *busy)
|
||||
int analog_available(struct analog_pvt *p)
|
||||
{
|
||||
int offhook;
|
||||
|
||||
ast_log(LOG_DEBUG, "%s %d\n", __FUNCTION__, p->channel);
|
||||
/* We're at least busy at this point */
|
||||
if (busy) {
|
||||
if ((p->sig == ANALOG_SIG_FXOKS) || (p->sig == ANALOG_SIG_FXOLS) || (p->sig == ANALOG_SIG_FXOGS)) {
|
||||
*busy = 1;
|
||||
}
|
||||
}
|
||||
/* If do not disturb, definitely not */
|
||||
if (p->dnd) {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user