aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_skinny.c
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-20 21:30:12 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-20 21:30:12 +0000
commit4cab609dbec4a54c3396301d8b559aaf71239f08 (patch)
tree7a41f0fcb6ea4c33f83eb552347e0f9804cfd056 /channels/chan_skinny.c
parentba50b8d2b949b92ce93778aa5be7473a971aed12 (diff)
Merged revisions 287643 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r287643 | qwell | 2010-09-20 16:29:46 -0500 (Mon, 20 Sep 2010) | 15 lines Merged revisions 287642 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r287642 | qwell | 2010-09-20 16:28:32 -0500 (Mon, 20 Sep 2010) | 8 lines Don't crash when parking a non-bridged call. (closes issue #17680) Reported by: jmhunter Patches: chan_skinny-park-v1.txt uploaded by DEA (license 3) Tested by: jmhunter, DEA ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@287644 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_skinny.c')
-rw-r--r--channels/chan_skinny.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index dc71d5012..e1c903512 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -5164,17 +5164,21 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession
if ((sub && sub->owner) && (sub->owner->_state == AST_STATE_UP)){
c = sub->owner;
- if (!ast_masq_park_call(ast_bridged_channel(c), c, 0, &extout)) {
- snprintf(message, sizeof(message), "Call Parked at: %d", extout);
- transmit_displaynotify(d, message, 10);
+ if (ast_bridged_channel(c)) {
+ if (!ast_masq_park_call(ast_bridged_channel(c), c, 0, &extout)) {
+ snprintf(message, sizeof(message), "Call Parked at: %d", extout);
+ transmit_displaynotify(d, message, 10);
+ } else {
+ transmit_displaynotify(d, "Call Park failed", 10);
+ }
} else {
- transmit_displaynotify(d, "Call Park failed", 10);
+ transmit_displaynotify(d, "Call Park not available", 10);
}
} else {
transmit_displaynotify(d, "Call Park not available", 10);
}
- }
break;
+ }
case STIMULUS_DND:
if (skinnydebug)
ast_verb(1, "Received Stimulus: DND (%d/%d)\n", instance, callreference);
@@ -6056,17 +6060,21 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
if ((sub && sub->owner) && (sub->owner->_state == AST_STATE_UP)){
c = sub->owner;
- if (!ast_masq_park_call(ast_bridged_channel(c), c, 0, &extout)) {
- snprintf(message, sizeof(message), "Call Parked at: %d", extout);
- transmit_displaynotify(d, message, 10);
+ if (ast_bridged_channel(c)) {
+ if (!ast_masq_park_call(ast_bridged_channel(c), c, 0, &extout)) {
+ snprintf(message, sizeof(message), "Call Parked at: %d", extout);
+ transmit_displaynotify(d, message, 10);
+ } else {
+ transmit_displaynotify(d, "Call Park failed", 10);
+ }
} else {
- transmit_displaynotify(d, "Call Park failed", 10);
+ transmit_displaynotify(d, "Call Park not available", 10);
}
} else {
transmit_displaynotify(d, "Call Park not available", 10);
}
- }
break;
+ }
case SOFTKEY_JOIN:
if (skinnydebug)
ast_verb(1, "Received Softkey Event: Join(%d/%d)\n", instance, callreference);