summaryrefslogtreecommitdiff
path: root/channels/sig_pri.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2009-08-06 19:52:11 +0000
committerRichard Mudgett <rmudgett@digium.com>2009-08-06 19:52:11 +0000
commitd7fa19a999d2ccffe5580ecdafe306d2b9efcce9 (patch)
tree916c96ee9b61088ec9fe100d94d0004f9a66db58 /channels/sig_pri.c
parent3bf326b898ff93716ceeeb27ebf077d7ba430baa (diff)
Sanity adjustments to pri_ss_thread for sig_pri environment.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sig_pri.c')
-rw-r--r--channels/sig_pri.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index 4e824c7eb..af280b594 100644
--- a/channels/sig_pri.c
+++ b/channels/sig_pri.c
@@ -601,11 +601,16 @@ static void *pri_ss_thread(void *data)
int len;
int timeout;
+ if (!chan) {
+ /* We lost the owner before we could get started. */
+ return NULL;
+ }
+
/*
* In the bizarre case where the channel has become a zombie before we
* even get started here, abort safely.
*/
- if (!p) {
+ if (!chan->tech_pvt) {
ast_log(LOG_WARNING, "Channel became a zombie before simple switch could be started (%s)\n", chan->name);
ast_hangup(chan);
return NULL;
@@ -666,7 +671,7 @@ static void *pri_ss_thread(void *data)
exit:
res = sig_pri_play_tone(p, SIG_PRI_TONE_CONGESTION);
if (res < 0)
- ast_log(LOG_WARNING, "Unable to play congestion tone on channel %d\n", p->channel);
+ ast_log(LOG_WARNING, "Unable to play congestion tone on channel %d\n", p->channel);
ast_hangup(chan);
return NULL;
}