<div dir="ltr"><p dir="ltr">Hi Luis,</p><p dir="ltr">It would be interesting to understand where the issue with document versioning was first introduced - it was working fine prior to 4.3 as far as I can tell.<br></p>
<p dir="ltr">We noticed some weirdness with BLF after upgrading to 4.3.4 on some production machines and soon realised it was due to the version being incorrect - however, these recent patches have only led to other issues/crashes in our offline tests today.</p><p>Can you shed any light on when it might have been introduced? I've not had much chance look myself but happy to spend some time over the weekend.</p>
<p dir="ltr">Cheers,<br>
Charles</p><p dir="ltr"><br></p>
<div class="gmail_quote">On 17 Dec 2015 10:09 pm, "Luis Azedo" <<a href="mailto:luis@2600hz.com" target="_blank">luis@2600hz.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Module: kamailio<br>
Branch: master<br>
Commit: b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35<br>
URL: <a href="https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35" rel="noreferrer" target="_blank">https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35</a><br>
<br>
Author: Luis Azedo <<a href="mailto:luis@2600hz.com" target="_blank">luis@2600hz.com</a>><br>
Committer: Luis Azedo <<a href="mailto:luis@2600hz.com" target="_blank">luis@2600hz.com</a>><br>
Date: 2015-12-17T21:02:43Z<br>
<br>
presence_dialoginfo : aux_body should return xmldoc instead of char<br>
<br>
---<br>
<br>
Modified: modules/presence/notify.c<br>
Modified: modules/presence_dialoginfo/notify_body.c<br>
<br>
---<br>
<br>
Diff:  <a href="https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35.diff" rel="noreferrer" target="_blank">https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35.diff</a><br>
Patch: <a href="https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35.patch" rel="noreferrer" target="_blank">https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35.patch</a><br>
<br>
---<br>
<br>
diff --git a/modules/presence/notify.c b/modules/presence/notify.c<br>
index efb8a48..f6a0ba9 100644<br>
--- a/modules/presence/notify.c<br>
+++ b/modules/presence/notify.c<br>
@@ -1535,8 +1535,7 @@ int send_notify_request(subs_t* subs, subs_t * watcher_subs,<br>
                                        {<br>
                                                aux_body = subs->event->aux_body_processing(subs, notify_body);<br>
                                                if(aux_body) {<br>
-                                                       xmlFree(notify_body->s);<br>
-                                                       pkg_free(notify_body);<br>
+                                                       free_notify_body(notify_body, subs->event);<br>
                                                        notify_body = aux_body;<br>
                                                }<br>
                                        }<br>
diff --git a/modules/presence_dialoginfo/notify_body.c b/modules/presence_dialoginfo/notify_body.c<br>
index e6dc050..710fe91 100644<br>
--- a/modules/presence_dialoginfo/notify_body.c<br>
+++ b/modules/presence_dialoginfo/notify_body.c<br>
@@ -595,5 +595,18 @@ str *dlginfo_body_setversion(subs_t *subs, str *body) {<br>
        memcpy(version_start, version, version_len);<br>
        memset(version_start + version_len, ' ', 12 - version_len);<br>
<br>
+       xmlDocPtr doc = xmlReadMemory(aux_body->s, aux_body->len, "noname.xml", NULL, 0);<br>
+        if (doc == NULL) {<br>
+               LM_ERR("error allocation xmldoc\n");<br>
+               pkg_free(aux_body->s);<br>
+               pkg_free(aux_body);<br>
+               return NULL;<br>
+       }<br>
+       pkg_free(aux_body->s);<br>
+        xmlDocDumpFormatMemory(doc,(xmlChar**)(void*)&aux_body->s, &aux_body->len, 1);<br>
+<br>
+        xmlCleanupParser();<br>
+        xmlMemoryDump();<br>
+<br>
        return aux_body;<br>
 }<br>
<br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div>
</div>

<br>
<div><font face="Helvetica, Arial, sans-serif"><font size="2"><b>** We're rebranding! Learn more <a href="http://www.sipcentric.com/2015/07/were-rebranding/" target="_blank">here</a> **</b></font></font></div><div><br></div><font face="Helvetica, Arial, sans-serif"><font size="2"><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
            <br>
            Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">@sipcentric</a><br>
            <br>
            <font color="gray">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered
                office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></span></font></font>