In SIPp 3.2, if the call rate is decreased to 0 and then increased
again, no calls will be made.
The attached patch fixes that behaviour by avoiding a situation where we
divide by zero.
I'll leave this up for comments and review for a few days, then check it
in if there are no objections. It should be a safe patch - it only
covers the case where rate or rate_period_ms are less than zero, which
a) is an edge case and b) didn't work anyway.
Best,
Rob
Index: opentask.cpp
===================================================================
--- opentask.cpp (revision 600)
+++ opentask.cpp (working copy)
@@ -61,7 +61,11 @@
return 0;
} else {
/* We need to compute when the next call is going to be opened. */
- return (unsigned long) (last_rate_change_time + ((calls_since_last_rate_change + 1) / (rate/rate_period_ms)));
+ if ((rate > 0) && (rate_period_ms > 0)) {
+ return (unsigned long) (last_rate_change_time + ((calls_since_last_rate_change + 1) / (rate/rate_period_ms)));
+ } else {
+ return (unsigned long) (last_rate_change_time + ((calls_since_last_rate_change + 1)));
+ }
}
}
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users