[Freeswitch-svn] [commit] r2725 - in freeswitch/trunk/src/mod: endpoints/mod_sofia timers/mod_softtimer
Freeswitch SVN
anthm at freeswitch.org
Sun Sep 17 17:57:20 EDT 2006
Author: anthm
Date: Sun Sep 17 17:57:20 2006
New Revision: 2725
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c
Log:
experimental tweaks
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Sun Sep 17 17:57:20 2006
@@ -812,9 +812,9 @@
size_t bytes = 0, samples = 0, frames = 0, ms = 0;
switch_channel_t *channel = NULL;
int payload = 0;
- switch_time_t now, started = switch_time_now(), last_act = switch_time_now();
- unsigned int elapsed;
- uint32_t hard_timeout = 60000 * 3;
+ //switch_time_t now, started = switch_time_now(), last_act = switch_time_now();
+ //unsigned int elapsed;
+ //uint32_t hard_timeout = 60000 * 3;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -835,10 +835,12 @@
ms = tech_pvt->read_codec.implementation->microseconds_per_frame;
if (tech_pvt->last_read) {
+#if 0
elapsed = (unsigned int)((switch_time_now() - tech_pvt->last_read) / 1000);
if (elapsed > 60000) {
return SWITCH_STATUS_TIMEOUT;
}
+#endif
}
if (switch_test_flag(tech_pvt, TFLAG_IO)) {
@@ -853,7 +855,7 @@
while (!switch_test_flag(tech_pvt, TFLAG_BYE) && switch_test_flag(tech_pvt, TFLAG_IO) && tech_pvt->read_frame.datalen == 0) {
- now = switch_time_now();
+ //now = switch_time_now();
tech_pvt->read_frame.flags = SFF_NONE;
status = switch_rtp_zerocopy_read_frame(tech_pvt->rtp_session, &tech_pvt->read_frame);
@@ -865,7 +867,7 @@
payload = tech_pvt->read_frame.payload;
-
+#if 0
elapsed = (unsigned int)((switch_time_now() - started) / 1000);
if (timeout > -1) {
@@ -878,7 +880,7 @@
if (elapsed >= hard_timeout) {
return SWITCH_STATUS_BREAK;
}
-
+#endif
if (switch_rtp_has_dtmf(tech_pvt->rtp_session)) {
char dtmf[128];
switch_rtp_dequeue_dtmf(tech_pvt->rtp_session, dtmf, sizeof(dtmf));
Modified: freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c
==============================================================================
--- freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c (original)
+++ freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c Sun Sep 17 17:57:20 2006
@@ -197,7 +197,8 @@
while (switch_time_now() < reference) {
//switch_yield((reference - now) - 1000);
- switch_yield(globals.timer_microseconds >> 1);
+ //switch_yield(globals.timer_microseconds >> 1);
+ switch_yield(1000);
}
current_ms += globals.timer_milliseconds;
More information about the Freeswitch-svn
mailing list