aboutsummaryrefslogtreecommitdiffstats
path: root/channels/sig_pri.c
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-10 16:55:34 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-10 16:55:34 +0000
commit090c22992b8ebd9b0de86374da8347130afc70b6 (patch)
treec08b4dad147a4d30292029f7ab4513b6f0c3f5ab /channels/sig_pri.c
parent8bb352d623b242752a3e876d37961e2663f77def (diff)
Simplified dahdi_request() channel selection failed reason/cause code.
Also avoid potential crash because cause could be NULL. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251585 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/sig_pri.c')
-rw-r--r--channels/sig_pri.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index c655e6deb..c1dff5f5e 100644
--- a/channels/sig_pri.c
+++ b/channels/sig_pri.c
@@ -3863,22 +3863,17 @@ int sig_pri_answer(struct sig_pri_chan *p, struct ast_channel *ast)
return res;
}
-int sig_pri_available(struct sig_pri_chan *p, int *reason)
+int sig_pri_available(struct sig_pri_chan *p)
{
/* If no owner and interface has a B channel then likely available */
if (!p->owner && !p->no_b_channel && p->pri) {
+ if (p->resetting || p->call
#if defined(HAVE_PRI_SERVICE_MESSAGES)
- if (p->resetting || p->call || p->service_status) {
- if (p->service_status) {
- *reason = AST_CAUSE_REQUESTED_CHAN_UNAVAIL;
- }
- return 0;
- }
-#else
- if (p->resetting || p->call) {
+ || p->service_status
+#endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */
+ ) {
return 0;
}
-#endif /* defined(HAVE_PRI_SERVICE_MESSAGES) */
return 1;
}