From: <saj...@us...> - 2010-11-08 13:02:34
|
Revision: 594 http://sipp.svn.sourceforge.net/sipp/?rev=594&view=rev Author: sajeeshs Date: 2010-11-08 13:02:28 +0000 (Mon, 08 Nov 2010) Log Message: ----------- ENH: Added option to configure global T2 Timer (Patch contributed by si...@hi...) Modified Paths: -------------- sipp/trunk/call.cpp sipp/trunk/sipp.cpp sipp/trunk/sipp.hpp Modified: sipp/trunk/call.cpp =================================================================== --- sipp/trunk/call.cpp 2010-10-26 06:49:11 UTC (rev 593) +++ sipp/trunk/call.cpp 2010-11-08 13:02:28 UTC (rev 594) @@ -1702,11 +1702,11 @@ } } else { nb_last_delay *= 2; - if (DEFAULT_T2_TIMER_VALUE < nb_last_delay) + if (global_t2 < nb_last_delay) { if (!bInviteTransaction) { - nb_last_delay = DEFAULT_T2_TIMER_VALUE; + nb_last_delay = global_t2; } } if(send_raw(last_send_msg, last_send_index, last_send_len) < -1) { @@ -3235,8 +3235,8 @@ /* * We are here due to a provisional response for non INVITE. Update our next retransmit. */ - next_retrans = clock_tick + DEFAULT_T2_TIMER_VALUE; - nb_last_delay = DEFAULT_T2_TIMER_VALUE; + next_retrans = clock_tick + global_t2; + nb_last_delay = global_t2; } } Modified: sipp/trunk/sipp.cpp =================================================================== --- sipp/trunk/sipp.cpp 2010-10-26 06:49:11 UTC (rev 593) +++ sipp/trunk/sipp.cpp 2010-11-08 13:02:28 UTC (rev 594) @@ -302,6 +302,8 @@ "Small values allow more precise scheduling but impacts CPU usage." "If the compression is on, the value is set to 50ms. The default value is 10ms.", SIPP_OPTION_TIME_MS, &timer_resolution, 1}, + {"T2", "Global T2-timer in milli seconds", SIPP_OPTION_TIME_MS, &global_t2, 1}, + {"sendbuffer_warn", "Produce warnings instead of errors on SendBuffer failures.", SIPP_OPTION_BOOL, &sendbuffer_warn, 1}, {"trace_msg", "Displays sent and received SIP messages in <scenario file name>_<pid>_messages.log", SIPP_OPTION_SETFLAG, &useMessagef, 1}, Modified: sipp/trunk/sipp.hpp =================================================================== --- sipp/trunk/sipp.hpp 2010-10-26 06:49:11 UTC (rev 593) +++ sipp/trunk/sipp.hpp 2010-11-08 13:02:28 UTC (rev 594) @@ -230,6 +230,8 @@ extern int max_recv_loops _DEFVAL(MAX_RECV_LOOPS_PER_CYCLE); extern int max_sched_loops _DEFVAL(MAX_SCHED_LOOPS_PER_CYCLE); +extern unsigned int global_t2 _DEFVAL(DEFAULT_T2_TIMER_VALUE); + extern char local_ip[40]; extern char local_ip_escaped[42]; extern bool local_ip_is_ipv6; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |