Skip to main content

A minor issue in the mbean of SIP Registrar

1 reply [Last post]
julianz
Offline
Joined: 2007-08-09
Points: 0

In the function to set the max expires value, if we input a number between 1~10.
The min expires value will be set to 0 or a negative number.
I have verified that with JMX console, when I set the max expires value to 7 and update, the min expires value is set to -3 automatically.
I know it's not reasonable to set the max expires value to a small number, but that's not disallowed either.
So I suggest to change the condition of first line of setSipRegistrationMaxExpires
if(maxExpires=<0 )
to if(maxExpires<=11) or some big number to avoid the min expires value be set to a negative number.

cheers,
Julian.
public void setSipRegistrationMaxExpires(long maxExpires) {
if(maxExpires<=0)
{
this.maxExpires=3600;
}
else
{
this.maxExpires=maxExpires;
}

if(this.maxExpires<=minExpires)
this.minExpires=this.maxExpires-10;
}

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
baranowb
Offline
Joined: 2006-01-09
Points: 0

Got it. Thanks