aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-27 17:02:12 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-27 17:02:12 +0000
commitc2f3b48b643a3ba37c05f17be5133a8ccf7ad033 (patch)
tree8bd92c98a27f1cc0da4f0de840fe4b66b34283ff /res
parent8bc90f4489d202be55ada37b5674775b2a15f471 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@43791 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_features.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 3d6f22cc5..fc1b4af48 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -1274,7 +1274,6 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
int hasfeatures=0;
int hadfeatures=0;
struct ast_option_header *aoh;
- struct timeval start = { 0 , 0 };
struct ast_bridge_config backup_config;
char *monitor_exec;
@@ -1323,14 +1322,11 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
peer->cdr = NULL;
}
for (;;) {
- if (config->feature_timer)
- start = ast_tvnow();
-
res = ast_channel_bridge(chan, peer, config, &f, &who);
if (config->feature_timer) {
/* Update time limit for next pass */
- diff = ast_tvdiff_ms(ast_tvnow(), start);
+ diff = ast_tvdiff_ms(ast_tvnow(), config->start_time);
config->feature_timer -= diff;
if (hasfeatures) {
/* Running on backup config, meaning a feature might be being
@@ -1367,7 +1363,12 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
hadfeatures = hasfeatures;
/* Continue as we were */
continue;
- }
+ } else if (!f) {
+ /* The bridge returned without a frame and there is a feature in progress.
+ * However, we don't think the feature has quite yet timed out, so just
+ * go back into the bridge. */
+ continue;
+ }
} else {
if (config->feature_timer <=0) {
/* We ran out of time */