[asterisk-commits] igorg: branch 11 r391379 - /branches/11/channels/chan_unistim.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jun 11 05:22:03 CDT 2013
Author: igorg
Date: Tue Jun 11 05:22:00 2013
New Revision: 391379
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=391379
Log:
Fix issue with no sound in both way in case of previous call to chan_unistim phone was canceled.
(related to ASTERISK-20183)
Modified:
branches/11/channels/chan_unistim.c
Modified: branches/11/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_unistim.c?view=diff&rev=391379&r1=391378&r2=391379
==============================================================================
--- branches/11/channels/chan_unistim.c (original)
+++ branches/11/channels/chan_unistim.c Tue Jun 11 05:22:00 2013
@@ -4777,7 +4777,7 @@
struct unistim_line *l;
struct unistim_device *d;
struct unistimsession *s;
- int i;
+ int i,end_call = 1;
s = channel_to_session(ast);
sub = ast_channel_tech_pvt(ast);
@@ -4822,10 +4822,8 @@
unistim_unalloc_sub(d, sub);
return 0;
}
-
if (sub->subtype == SUB_REAL) {
sub_stop_silence(s, sub);
- send_end_call(s); /* Send end call packet only if ending active call, in other way sound should be loosed */
} else if (sub->subtype == SUB_RING) {
send_no_ring(s);
for (i = 0; i < FAVNUM; i++) {
@@ -4836,8 +4834,16 @@
if (is_key_line(d, i) && !strcmp(l->name, d->sline[i]->name)) {
send_favorite_short(i, FAV_LINE_ICON, s);
d->ssub[i] = NULL;
- }
- }
+ continue;
+ }
+ if (d->ssub[i] != NULL) { /* Found other subchannel active other then hangup'ed one */
+ ast_log(LOG_WARNING, "There is not only one call here %p %p %i\n",d->ssub[i], sub, i);
+ end_call = 0;
+ }
+ }
+ }
+ if (end_call) {
+ send_end_call(s); /* Send end call packet only if ending active call, in other way sound should be loosed */
}
sub->moh = 0;
if (sub->softkey >= 0) {
@@ -6132,7 +6138,7 @@
return 0;
}
if (d->softkeyicon[p] != 0) {
- ast_log(LOG_WARNING, "Invalid position %d for bookmark : already used\n:", p);
+ ast_log(LOG_WARNING, "Invalid position %d for bookmark : already used:\n", p);
return 0;
}
memmove(line, line + 2, sizeof(line) - 2);
More information about the asterisk-commits
mailing list