aboutsummaryrefslogtreecommitdiffstats
path: root/channels/sig_pri.c
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-30 23:26:41 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-30 23:26:41 +0000
commitd9cdfa12c347deed2cb6e32f47c1fb34b29d120c (patch)
tree9e4bbc95fe97dbcf4fb2335896c75879f0f036f9 /channels/sig_pri.c
parenta0a297595288e5548b7786687ed7a06ce9753842 (diff)
Cleanup some flags on DAHDI PRI channel hangup.
* Cleanup some flags on DAHDI PRI channel hangup. (sig_pri split) * Make sure the outgoing flag is cleared if a new channel fails to get created for outgoing calls. * Remove some unused flags since sig_pri was split. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@226648 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/sig_pri.c')
-rw-r--r--channels/sig_pri.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index 5db73c204..f369fa381 100644
--- a/channels/sig_pri.c
+++ b/channels/sig_pri.c
@@ -725,9 +725,16 @@ static struct ast_channel *sig_pri_new_ast_channel(struct sig_pri_chan *p, int s
struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law, const struct ast_channel *requestor)
{
+ struct ast_channel *ast;
+
ast_log(LOG_DEBUG, "%s %d\n", __FUNCTION__, p->channel);
- return sig_pri_new_ast_channel(p, AST_STATE_RESERVED, 0, law, 0, p->exten, requestor);
+ p->outgoing = 1;
+ ast = sig_pri_new_ast_channel(p, AST_STATE_RESERVED, 0, law, 0, p->exten, requestor);
+ if (!ast) {
+ p->outgoing = 0;
+ }
+ return ast;
}
int pri_is_up(struct sig_pri_pri *pri)