mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Fix the AbsoluteTimeout issue with IAX/IAX2 when in native mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1962,6 +1962,10 @@ static int iax_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags,
|
|||||||
to = 1000;
|
to = 1000;
|
||||||
who = ast_waitfor_n(cs, 2, &to);
|
who = ast_waitfor_n(cs, 2, &to);
|
||||||
if (!who) {
|
if (!who) {
|
||||||
|
if (ast_check_hangup(c0) || ast_check_hangup(c1)) {
|
||||||
|
res = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
f = ast_read(who);
|
f = ast_read(who);
|
||||||
|
|||||||
@@ -1985,7 +1985,7 @@ static int iax2_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags
|
|||||||
struct ast_channel *cs[3];
|
struct ast_channel *cs[3];
|
||||||
struct ast_channel *who;
|
struct ast_channel *who;
|
||||||
int to = -1;
|
int to = -1;
|
||||||
int res;
|
int res = -1;
|
||||||
int transferstarted=0;
|
int transferstarted=0;
|
||||||
struct ast_frame *f;
|
struct ast_frame *f;
|
||||||
struct chan_iax2_pvt *p0 = c0->pvt->pvt;
|
struct chan_iax2_pvt *p0 = c0->pvt->pvt;
|
||||||
@@ -2023,7 +2023,6 @@ static int iax2_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags
|
|||||||
ast_log(LOG_WARNING, "Unable to start the transfer\n");
|
ast_log(LOG_WARNING, "Unable to start the transfer\n");
|
||||||
transferstarted = 1;
|
transferstarted = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((p0->transferring == TRANSFER_RELEASED) && (p1->transferring == TRANSFER_RELEASED)) {
|
if ((p0->transferring == TRANSFER_RELEASED) && (p1->transferring == TRANSFER_RELEASED)) {
|
||||||
/* Call has been transferred. We're no longer involved */
|
/* Call has been transferred. We're no longer involved */
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
@@ -2042,6 +2041,10 @@ static int iax2_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags
|
|||||||
to = 1000;
|
to = 1000;
|
||||||
who = ast_waitfor_n(cs, 2, &to);
|
who = ast_waitfor_n(cs, 2, &to);
|
||||||
if (!who) {
|
if (!who) {
|
||||||
|
if (ast_check_hangup(c0) || ast_check_hangup(c1)) {
|
||||||
|
res = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
f = ast_read(who);
|
f = ast_read(who);
|
||||||
|
|||||||
Reference in New Issue
Block a user