Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-11-03 Thread Emmanuel Schmidbauer
it's not entirely clear to me what this PR fixes. What about adding a module parameter (default = enabled) to enable this code? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-11-03 Thread lazedo
@eschmidbauer yep, but that's wrong by definition, we had the same problem. try sending `expires = 3600` , it will work. i'm ok with this commit, it could be improved if we were able to ignore the `0` which we interpret as `do not expire` -- You are receiving this because you are subscribed

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-11-03 Thread Emmanuel Schmidbauer
@lazedo you can see that we sending expires=1 in our NSQ message and in nsq_pua.c ```C struct json_object *ExpiresObj = nsq_json_get_object(json_obj, BLF_JSON_EXPIRES); if (ExpiresObj != NULL) { expires = json_object_get_int(ExpiresObj); if

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-11-03 Thread lazedo
the problem with this commit is for expired column = 0 which is usually set on "early" state -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-11-03 Thread Emmanuel Schmidbauer
@miconda yes, we are seeing this issue during runtime. not on startup we reverted the commit and problem went away -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-11-03 Thread Daniel-Constantin Mierla
@eschmidbauer - is it affecting the runtime behaviour, because it should have been targeting only the startup procedure? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-11-03 Thread Emmanuel Schmidbauer
this commit broke presence for us. we use NSQ + presence, after a phone reboots and we send a NOTIFY with confirmed state, presence module sends a NOTIFY with terminated state. please revert this commit. see the log and SIP packet below: ``` Nov 3 09:23:52 /usr/local/sbin/kamailio[26288]:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-11-01 Thread Daniel-Constantin Mierla
Merged #809. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/809#event-843376386___ sr-dev mailing list sr-dev@lists.sip-router.org

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-11-01 Thread Daniel-Constantin Mierla
@phil-lavin: thanks for the feedback, I am going to merge this one. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-11-01 Thread Phil Lavin
It's been running here for a while and it has had no side effects. That said, it doesn't resolve any problems that we are facing. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-31 Thread Daniel-Constantin Mierla
If none else has comments, probably I will merge this patch in the next few days. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-28 Thread Daniel-Constantin Mierla
@phil-lavin wondering if you got any chance to test this one in order to merge or not. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-17 Thread Stefan Kohlhauser
Commits squashed. (Thanks, @linuxmaniac, for the tip. I didn't know you could do that in Git.) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-17 Thread Phil Lavin
We know there are issues restarting Kamailio with presentity entries in place. The old entries cause problems until they expire. We think we have narrowed this down to the pua db_mode - we can't store PUA entries in the database because that logic is broken in quite a few ways. That said, I'll

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-14 Thread Daniel-Constantin Mierla
@linuxmaniac I think that can be done from the "Merge pull request" button here -- it has the right arrow down that gives more options one of them is "Squash and merge" -- never tried, but from your description it looks like what you want. -- You are receiving this because you are subscribed

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-14 Thread Victor Seva
@Chocolatbuddha please, make this change with one commit. Just squash those two commits in one and force push to your branch in order to get a pull request with a single commit -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-14 Thread Daniel-Constantin Mierla
Before merging, maybe other people using presence modules, like @phil-lavin or @lazedo, can have a look and comment if they find something inconsistent here, because I don't have the time right now to go in deeper review and analysis of the code for side effects. -- You are receiving this

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-10 Thread Stefan Kohlhauser
The DB was updated correctly and showed no problems whatsoever in our tests. The problems were only in the hash table. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-10 Thread Daniel-Constantin Mierla
Double checking here, to save time digging the code -- are the expired entry in DB still deleted properly if they are not loaded anymore? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-10 Thread Stefan Kohlhauser
The problem we experienced was that the kamailio would sometimes send empty NOTIFYs after start. This problem was persistent until the kamailio was restarted again. We found out that this would occur in case the presentity table contained more or equal expired entries than valid ones. Lets

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-07 Thread Daniel-Constantin Mierla
Can you provide more details about what is the inconsistency? More information about how the problem you tried to fix is exposed will help to understand properly the patch. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-04 Thread Stefan Kohlhauser
@Chocolatbuddha pushed 1 commit. 29f6ba4 Fix variable name -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kamailio/pull/809/files/c672d23795b17a8238595a491fd0ed3018075ed7..29f6ba4185b83db6f8c8759446d37eccdf00208a

[sr-dev] [kamailio/kamailio] Presence: Fix startup inconsistency in presentity hash table (#809)

2016-10-04 Thread Stefan Kohlhauser
pres_htable_restore(): Remove check of expired presentity entries when initially filling the hash table to represent the number of expired + valid entries. Because hash.c::delete_phtable() decrements publ_count on removal of _every_ expired DB entry. get_p_notify_body(): Compensate the fix on hash