if (bridge_end.tv_sec) {
to = ast_tvdiff_ms(bridge_end, ast_tvnow());
if (to <= 0) {
- res = AST_BRIDGE_COMPLETE;
+ if (config->timelimit)
+ res = AST_BRIDGE_RETRY;
+ else
+ res = AST_BRIDGE_COMPLETE;
break;
}
} else
now = ast_tvnow();
to = ast_tvdiff_ms(nexteventts, now);
if (to <= 0) {
- res = AST_BRIDGE_COMPLETE;
- break;
+ if (!config->timelimit) {
+ res = AST_BRIDGE_COMPLETE;
+ break;
+ }
+ to = 0;
}
}