[sr-dev] git:master:b6b7de88: presence_dialoginfo : aux_body should return xmldoc instead of char
Charles Chance
charles.chance at sipcentric.com
Fri Dec 18 09:18:05 CET 2015
Thanks Luis.
If it's been like it for all this time then perhaps some other change
recently has exasperated the issue, since it only became noticeable for us
after upgrading to 4.3. It had been fine - or at least not noticeable - for
several years prior to that, with the same setup everywhere (db mode 2).
Anyway, thanks for fixing!
Cheers,
Charles
On 18 Dec 2015 12:47 am, "Luis Azedo" <luis at 2600hz.com> wrote:
> Hi Charles,
>
> i'm not entirely sure but it seems that its been like this for a long time
> time (2008 with little changes in 2012). i usually make use of notifier
> workers (db mode = 3) where this was no issue.
>
> i received a report about the versioning, identified the code path (it was
> db_mode = 2 even tho the notifier_processes were 5) which was different ,
> identified the issue and corrected it. sorry for the false start on the
> correction, i was fooled by travis and misread the return type which lead
> to crashing.
>
> Best
>
> ------------------------------
> *From:* sr-dev [sr-dev-bounces at lists.sip-router.org] on behalf of Charles
> Chance [charles.chance at sipcentric.com]
> *Sent:* Thursday, December 17, 2015 4:11 PM
> *To:* sr-dev
> *Subject:* Re: [sr-dev] git:master:b6b7de88: presence_dialoginfo :
> aux_body should return xmldoc instead of char
>
> Hi Luis,
>
> 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.
>
> 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.
>
> 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.
>
> Cheers,
> Charles
>
>
> On 17 Dec 2015 10:09 pm, "Luis Azedo" <luis at 2600hz.com> wrote:
>
>> Module: kamailio
>> Branch: master
>> Commit: b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35
>> URL:
>> https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35
>>
>> Author: Luis Azedo <luis at 2600hz.com>
>> Committer: Luis Azedo <luis at 2600hz.com>
>> Date: 2015-12-17T21:02:43Z
>>
>> presence_dialoginfo : aux_body should return xmldoc instead of char
>>
>> ---
>>
>> Modified: modules/presence/notify.c
>> Modified: modules/presence_dialoginfo/notify_body.c
>>
>> ---
>>
>> Diff:
>> https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35.diff
>> Patch:
>> https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35.patch
>>
>> ---
>>
>> diff --git a/modules/presence/notify.c b/modules/presence/notify.c
>> index efb8a48..f6a0ba9 100644
>> --- a/modules/presence/notify.c
>> +++ b/modules/presence/notify.c
>> @@ -1535,8 +1535,7 @@ int send_notify_request(subs_t* subs, subs_t *
>> watcher_subs,
>> {
>> aux_body =
>> subs->event->aux_body_processing(subs, notify_body);
>> if(aux_body) {
>> -
>> xmlFree(notify_body->s);
>> -
>> pkg_free(notify_body);
>> +
>> free_notify_body(notify_body, subs->event);
>> notify_body =
>> aux_body;
>> }
>> }
>> diff --git a/modules/presence_dialoginfo/notify_body.c
>> b/modules/presence_dialoginfo/notify_body.c
>> index e6dc050..710fe91 100644
>> --- a/modules/presence_dialoginfo/notify_body.c
>> +++ b/modules/presence_dialoginfo/notify_body.c
>> @@ -595,5 +595,18 @@ str *dlginfo_body_setversion(subs_t *subs, str
>> *body) {
>> memcpy(version_start, version, version_len);
>> memset(version_start + version_len, ' ', 12 - version_len);
>>
>> + xmlDocPtr doc = xmlReadMemory(aux_body->s, aux_body->len,
>> "noname.xml", NULL, 0);
>> + if (doc == NULL) {
>> + LM_ERR("error allocation xmldoc\n");
>> + pkg_free(aux_body->s);
>> + pkg_free(aux_body);
>> + return NULL;
>> + }
>> + pkg_free(aux_body->s);
>> + xmlDocDumpFormatMemory(doc,(xmlChar**)(void*)&aux_body->s,
>> &aux_body->len, 1);
>> +
>> + xmlCleanupParser();
>> + xmlMemoryDump();
>> +
>> return aux_body;
>> }
>>
>>
>> _______________________________________________
>> sr-dev mailing list
>> sr-dev at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>
>
> *** We're rebranding! Learn more here
> <http://www.sipcentric.com/2015/07/were-rebranding/> ***
>
> www.sipcentric.com
>
> Follow us on twitter @sipcentric <http://twitter.com/sipcentric>
>
> Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
> office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
> Birmingham Science Park, Birmingham B7 4BB.
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>
--
*** We're rebranding! Learn more here
<http://www.sipcentric.com/2015/07/were-rebranding/> ***
www.sipcentric.com
Follow us on twitter @sipcentric <http://twitter.com/sipcentric>
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street,
Birmingham Science Park, Birmingham B7 4BB.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20151218/ebf7b940/attachment.html>
More information about the sr-dev
mailing list