[asterisk-commits] igorg: trunk r375017 - in /trunk: ./ channels/chan_unistim.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 15 03:27:00 CDT 2012
Author: igorg
Date: Mon Oct 15 03:26:58 2012
New Revision: 375017
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=375017
Log:
Fix underscreen buttons warnings apeared while transfer process
........
Merged revisions 375016 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/channels/chan_unistim.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=375017&r1=375016&r2=375017
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Mon Oct 15 03:26:58 2012
@@ -3297,7 +3297,7 @@
static void key_call(struct unistimsession *pte, char keycode)
{
- struct unistim_subchannel *sub = NULL;
+ struct unistim_subchannel *sub = get_sub(pte->device, SUB_REAL);
if ((keycode >= KEY_0) && (keycode <= KEY_SHARP)) {
if (keycode == KEY_SHARP) {
keycode = '#';
@@ -3311,15 +3311,19 @@
}
switch (keycode) {
case KEY_FUNC1:
- if (get_sub(pte->device, SUB_THREEWAY)) {
- close_call(pte);
+ if (ast_channel_state(sub->owner) == AST_STATE_UP) {
+ if (get_sub(pte->device, SUB_THREEWAY)) {
+ close_call(pte);
+ }
}
break;
case KEY_FUNC2:
- if (get_sub(pte->device, SUB_THREEWAY)) {
- transfer_cancel_step2(pte);
- } else {
- transfer_call_step1(pte);
+ if (ast_channel_state(sub->owner) == AST_STATE_UP) {
+ if (get_sub(pte->device, SUB_THREEWAY)) {
+ transfer_cancel_step2(pte);
+ } else {
+ transfer_call_step1(pte);
+ }
}
break;
case KEY_HANGUP:
@@ -3351,7 +3355,6 @@
MUTE_OFF);
break;
case KEY_MUTE:
- sub = get_sub(pte->device, SUB_REAL);
if (!sub || !sub->owner) {
ast_log(LOG_WARNING, "Unable to find subchannel for music on hold\n");
return;
@@ -3366,7 +3369,6 @@
}
break;
case KEY_ONHOLD:
- sub = get_sub(pte->device, SUB_REAL);
if (!sub) {
if(pte->device->ssub[pte->device->selected]) {
sub_hold(pte, pte->device->ssub[pte->device->selected]);
More information about the asterisk-commits
mailing list