[asterisk-commits] mmichelson: branch mmichelson/timeout_fixes r373847 - in /team/mmichelson/tim...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 26 15:32:51 CDT 2012
Author: mmichelson
Date: Wed Sep 26 15:32:47 2012
New Revision: 373847
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373847
Log:
Fix compilation and logical errors introduced in previous commits.
Modified:
team/mmichelson/timeout_fixes/apps/app_dial.c
team/mmichelson/timeout_fixes/apps/app_queue.c
team/mmichelson/timeout_fixes/apps/app_record.c
team/mmichelson/timeout_fixes/channels/chan_dahdi.c
team/mmichelson/timeout_fixes/channels/sig_analog.c
team/mmichelson/timeout_fixes/channels/sig_pri.c
Modified: team/mmichelson/timeout_fixes/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/timeout_fixes/apps/app_dial.c?view=diff&rev=373847&r1=373846&r2=373847
==============================================================================
--- team/mmichelson/timeout_fixes/apps/app_dial.c (original)
+++ team/mmichelson/timeout_fixes/apps/app_dial.c Wed Sep 26 15:32:47 2012
@@ -1055,7 +1055,7 @@
int is_cc_recall;
int cc_frame_received = 0;
int num_ringing = 0;
- struct ast_timeval start = ast_tvnow();
+ struct timeval start = ast_tvnow();
ast_party_connected_line_init(&connected_caller);
if (single) {
Modified: team/mmichelson/timeout_fixes/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/timeout_fixes/apps/app_queue.c?view=diff&rev=373847&r1=373846&r2=373847
==============================================================================
--- team/mmichelson/timeout_fixes/apps/app_queue.c (original)
+++ team/mmichelson/timeout_fixes/apps/app_queue.c Wed Sep 26 15:32:47 2012
@@ -3473,7 +3473,7 @@
#endif
struct ast_party_connected_line connected_caller;
char *inchan_name;
- struct timeval start = ast_tvnow();
+ struct timeval start_time_tv = ast_tvnow();
ast_party_connected_line_init(&connected_caller);
@@ -3532,9 +3532,9 @@
}
/* Poll for events from both the incoming channel as well as any outgoing channels */
- *to = ast_remaining_ms(start, orig);
+ *to = ast_remaining_ms(start_time_tv, orig);
winner = ast_waitfor_n(watchers, pos, to);
- *to = ast_remaining_ms(start, orig);
+ *to = ast_remaining_ms(start_time_tv, orig);
/* Service all of the outgoing channels */
for (o = start; o; o = o->call_next) {
Modified: team/mmichelson/timeout_fixes/apps/app_record.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/timeout_fixes/apps/app_record.c?view=diff&rev=373847&r1=373846&r2=373847
==============================================================================
--- team/mmichelson/timeout_fixes/apps/app_record.c (original)
+++ team/mmichelson/timeout_fixes/apps/app_record.c Wed Sep 26 15:32:47 2012
@@ -341,10 +341,9 @@
}
if (ms > 0 && waitres == 0) {
- gottimeout = 1;
- pbx_builtin_setvar_helper(chan, "RECORD_STATUS", "TIMEOUT");
- break;
- }
+ gottimeout = 1;
+ pbx_builtin_setvar_helper(chan, "RECORD_STATUS", "TIMEOUT");
+ break;
}
f = ast_read(chan);
Modified: team/mmichelson/timeout_fixes/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/timeout_fixes/channels/chan_dahdi.c?view=diff&rev=373847&r1=373846&r2=373847
==============================================================================
--- team/mmichelson/timeout_fixes/channels/chan_dahdi.c (original)
+++ team/mmichelson/timeout_fixes/channels/chan_dahdi.c Wed Sep 26 15:32:47 2012
@@ -10779,7 +10779,7 @@
cs = NULL;
dahdi_setlinear(p->subs[idx].dfd, 0);
off_ms = 2000;
- start = ast_tv_now();
+ start = ast_tvnow();
while (ast_tvdiff_ms(ast_tvnow(), start) < off_ms) {
struct ast_frame *f;
int ms = ast_remaining_ms(start, off_ms);
Modified: team/mmichelson/timeout_fixes/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/timeout_fixes/channels/sig_analog.c?view=diff&rev=373847&r1=373846&r2=373847
==============================================================================
--- team/mmichelson/timeout_fixes/channels/sig_analog.c (original)
+++ team/mmichelson/timeout_fixes/channels/sig_analog.c Wed Sep 26 15:32:47 2012
@@ -2505,7 +2505,7 @@
struct ast_frame *f;
int ms = ast_remaining_ms(off_start, off_ms);
- res = ast_waitfor(chan, res);
+ res = ast_waitfor(chan, ms);
if (res <= 0) {
ast_log(LOG_WARNING, "CID timed out waiting for ring. "
"Exiting simple switch\n");
Modified: team/mmichelson/timeout_fixes/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/timeout_fixes/channels/sig_pri.c?view=diff&rev=373847&r1=373846&r2=373847
==============================================================================
--- team/mmichelson/timeout_fixes/channels/sig_pri.c (original)
+++ team/mmichelson/timeout_fixes/channels/sig_pri.c Wed Sep 26 15:32:47 2012
@@ -1832,6 +1832,7 @@
char ex[80];
/* Wait up to 30 seconds for an answer */
int timeout_ms = 30000;
+ struct timeval start;
ast_verb(3, "Initiating idle call on channel %s\n", chan->name);
snprintf(ex, sizeof(ex), "%d/%s", pvt->channel, pvt->pri->idledial);
@@ -1840,6 +1841,7 @@
ast_hangup(chan);
return NULL;
}
+ start = ast_tvnow();
while (ast_tvdiff_ms(ast_tvnow(), start) < timeout_ms) {
int ms = ast_remaining_ms(start, timeout_ms);
More information about the asterisk-commits
mailing list