[asterisk-commits] qwell: branch 1.6.2 r287642 - /branches/1.6.2/channels/chan_skinny.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Sep 20 16:28:40 CDT 2010
Author: qwell
Date: Mon Sep 20 16:28:32 2010
New Revision: 287642
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=287642
Log:
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
Modified:
branches/1.6.2/channels/chan_skinny.c
Modified: branches/1.6.2/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/channels/chan_skinny.c?view=diff&rev=287642&r1=287641&r2=287642
==============================================================================
--- branches/1.6.2/channels/chan_skinny.c (original)
+++ branches/1.6.2/channels/chan_skinny.c Mon Sep 20 16:28:32 2010
@@ -4894,17 +4894,21 @@
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;
+ break;
+ }
case STIMULUS_DND:
if (skinnydebug)
ast_verb(1, "Received Stimulus: DND (%d/%d)\n", instance, callreference);
@@ -5984,17 +5988,21 @@
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;
+ break;
+ }
case SOFTKEY_JOIN:
if (skinnydebug)
ast_verb(1, "Received Softkey Event: Join(%d/%d)\n", instance, callreference);
More information about the asterisk-commits
mailing list