Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-19 Thread Daniel-Constantin Mierla
My work was to get it at least work as before of 839cf89. I do not have time for any further work, so anyone else willing to do it is more than welcome. You can open a PR when you start the work and ask for review/suggestions if you get stuck. -- You are receiving this because you are

Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-19 Thread Vasiliy Ganchev
Hi, Daniel! I did more testing and provided change works. What do you think regarding proper solution with comparing call-id (as you mentioned in the beginning)? Because current change improve the situation, but it is not what is expected by RFC. Anyway - I think this changes should be

Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-19 Thread Daniel-Constantin Mierla
Thanks, reopen (if related) or create a new item (if different) when something wrong pops up. -- 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: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-19 Thread Daniel-Constantin Mierla
Closed #1427. -- 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/issues/1427#event-1480150056___ Kamailio (SER) - Development Mailing List

Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-16 Thread Vasiliy Ganchev
thanks for the last patch, I tried it. Making the fast check the match of multiple dialog body works as expected. Let me do deeper testing today. Will report results later. -- 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: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-16 Thread Daniel-Constantin Mierla
I just pushed patch 29d09b38fab5a1ee8d7f6f82818e3d3446d4dd8b for it. -- 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: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-16 Thread Vasiliy Ganchev
my shame... I did not do NULL check and that was the reason for crash. With your logging added (processing same body and input PUBLISH as before): ``` Feb 16 08:54:16 0050562c117c /usr/sbin/kamailio[30264]: ERROR: presence [presentity.c:361]: ps_match_dialog_state_from_body(): vstate is

Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-15 Thread Daniel-Constantin Mierla
Put this do...while(): ``` /* search for next dialog node */ do { LM_ERR("do entered \n"); if(node->next != NULL && node->next->name != NULL && xmlStrcmp(node->name,

Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-15 Thread Vasiliy Ganchev
Hi, Daniel! Thank you for your help! I tried to print that value in logs, but get stuck a bit (I did not found how to print xml elements correctly). I got some sequence of crashes while attempts to add appropriate logs. What I tried more: I changed: ` &&

Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-15 Thread Daniel-Constantin Mierla
Can you print `node->name` and `node->next->name` inside the `do { } while()` to see the names that are compared there? -- 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: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-14 Thread Vasiliy Ganchev
re-tested it again, it does check only first dialog in a body your code with my custom logging ``` int ps_match_dialog_state_from_body(str body, int *is_dialog, char *vstate) { xmlDocPtr doc; xmlNodePtr node; xmlNodePtr childNode; char *tmp_state; int

Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-12 Thread Vasiliy Ganchev
The result: for multiple dialog bodie only first body checked (I added custom logging inside your code to see where it worked) -- 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: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-12 Thread Daniel-Constantin Mierla
What was the result of testing it? Not working? The `while()` is there to deal with xml docs that have many `dialog` nodes. The `do { ... } while ()` is to find the next node with `dialog` name. These are to be compliant with xml specs, as there can be other nodes with different names. So just

Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-12 Thread Vasiliy Ganchev
I tried proposed changes. in ps_match_dialog_state_from_body there is a loop: while(node != NULL) { why do we need there one more while loop? What actually happens: . if(strcmp(tmp_state, vstate)!=0) { // here we come only once, when matching first dialog ... all later dialogs are

Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-12 Thread Vasiliy Ganchev
Hi, Daniel! thanks for the patch! will give it a try today -- 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: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-12 Thread Daniel-Constantin Mierla
@vance-od - I tried a quick fix with the patches referenced above. Can you try with them and see if all ok? It relies on matching all related dialog states in the same xml document. If one found mismatching, then will not consider it terminated. Likely it can be improved with matching on

Re: [sr-dev] [kamailio/kamailio] presence: incorrect dialog state for multiple dialogs xml body (#1427)

2018-02-05 Thread Vasiliy Ganchev
@phil-lavin , can you take a look at this thread? -- 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/issues/1427#issuecomment-363106217___