[OpenSIPS-Devel] [ opensips-Bugs-3610662 ] REGISTRAR save with force flag and limited contacts broken

SourceForge.net noreply at sourceforge.net
Fri Apr 19 13:59:40 CEST 2013


Bugs item #3610662, was opened at 2013-04-12 01:32
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3610662&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.8.x
>Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Kiss Karoly (kisskaroly)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: REGISTRAR save with force flag and limited contacts broken

Initial Comment:
When using save in registrar module with f and cXX flags set, the number of contacts can exceed the XX value.
Consider the following scenario: 3 devices registering with the same SIP account and XX above is set to 2, with f flag set. In this case we should be seeing two contacts saved, and the third should randomly overwrite one of the two contacts because of the force flag. What I see instead is that when the third device registers, one of the contacts is correctly overwritten, however when the device whos contact was overwritten, reregisters, it's contact is incorrectly added to the list of contacts, thus exceeding the limit of maximum allowed contacts. The cXX flag in my case is specified as a parameter to the save command in script.
Tested with opensips 1.8.2 svn rev 9438.

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2013-04-18 07:31

Message:
Kiss,

Following our chat on IRC, see the new patch (Final fix with change in
limit) that hopefully solve all the issues.

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2013-04-17 10:26

Message:
Kiss, indeed, the update logic was not fully correct - I tried a simpler
approach (which should work) - the version 2 patch is here, against SVN (so
remove any prev patch).
Please have it tested and let me know what's the result :)

Thanks and regards,
Bogdan

----------------------------------------------------------------------

Comment By: Kiss Karoly (kisskaroly)
Date: 2013-04-16 05:41

Message:
With this patch, the original problem is solved, however still not working
as expected.
The problem is, that when max allowed regs is 2 and there are two contacts
registered, at the first refresh by one of the contacts, the other contact
is deleted. I would expect it not to delete any contacts, when I allow 2
and have 2.

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2013-04-15 09:39

Message:
Hi Kiss,

Attached is a patch that should solve the problem - at least it solved it
in my tests :).

Please apply it and give it a try - ignore the really verbose debug
messages :D.

Thanks and regards,
Bogdan 

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2013-04-12 10:46

Message:
Hi Kiss,

I managed to reproduce the scenario - I'm working on a fix.

Thanks and regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3610662&group_id=232389



More information about the Devel mailing list