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

Vasiliy Ganchev notifications at github.com
Mon Feb 12 17:55:01 CET 2018


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 iterating in the second while loop. 

as for me  this part of code
```
+ do {
+			if(node->next != NULL && node->next->name != NULL
+					&& xmlStrcmp(node->name, node->next->name) == 0) {
+				node = node->next;
+				break;
+			}
+			node = node->next;
+		} while(node != NULL);
```

should look like:
```
			node = node->next;
```
maybe that checks for NULL are also necessary, but not while do-while.

General question - is there a way to propose changes in your custom branch? 

thanks for your help!

-- 
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-364987310
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180212/bfe29796/attachment-0001.html>


More information about the sr-dev mailing list