the commit was introduced because of dbmode = 3
> pres_timer_send_notify
> process_dialogs
> notifier_notify
> notify
> send_notify_request

and then gets the body and processes the aux_body_processing

notify_body = get_p_notify_body(subs->pres_uri,
subs->event, NULL, (subs->contact.s)?&subs->contact:NULL);
if(notify_body == NULL || notify_body->s== NULL)
{
LM_DBG("Could not get the notify_body\n");
}
else
{
/* call aux_body_processing if exists */
if(subs->event->aux_body_processing)
{
aux_body = subs->event->aux_body_processing(subs, notify_body);


but you haven't detailed your issue, so i'm not sure how to help you.

Best


From: sr-dev [sr-dev-bounces@lists.sip-router.org] on behalf of Charles Chance [charles.chance@sipcentric.com]
Sent: Thursday, January 14, 2016 7:35 AM
To: sr-dev
Subject: [sr-dev] Presence notify - duplicate aux body processing?

Hi All,

Whilst attempting to track down the source of an issue introduced at some point since 4.2.1, I came across the following and would appreciate a second opinion.

In send_notify_request() function (/modules/presence/notify.c), the aux body processing function attached to the event is called:

/* call aux_body_processing if exists */
if(subs->event->aux_body_processing)
{
aux_body = subs->event->aux_body_processing(subs, notify_body);
if(aux_body) {
free_notify_body(notify_body, subs->event);
notify_body = aux_body;
}
}


However, by the time we reach this function, aux body processing will already have been completed (specifically in the publ_notify() or query_db_notify() functions of the same file).

If I remove the duplicate function call, the issue goes away - but I'm reluctant to submit a pull request which reverts an earlier commit, unless I can understand the reason for the change in the first place. Especially since it was made a year ago.

Is anyone able to explain what I'm missing?

Cheers,

Charles


** We're rebranding! Learn more here **

www.sipcentric.com

Follow us on twitter @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.