Module: kamailio
Branch: master
Commit: cfef15ef1ca52abf4d6df129a5768baa0aaf5a07
URL:
https://github.com/kamailio/kamailio/commit/cfef15ef1ca52abf4d6df129a5768ba…
Author: lazedo <luis.azedo(a)factorlusitano.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-28T18:26:37+01:00
presence: do aux_body_processing() if exists after get_p_notify_body()
- fix for send_notify_request()
---
Modified: modules/presence/notify.c
---
Diff:
https://github.com/kamailio/kamailio/commit/cfef15ef1ca52abf4d6df129a5768ba…
Patch:
https://github.com/kamailio/kamailio/commit/cfef15ef1ca52abf4d6df129a5768ba…
---
diff --git a/modules/presence/notify.c b/modules/presence/notify.c
index 24c0a9d..1511587 100644
--- a/modules/presence/notify.c
+++ b/modules/presence/notify.c
@@ -1526,21 +1526,30 @@ int send_notify_request(subs_t* subs, subs_t * watcher_subs,
{
LM_DBG("Could not get the notify_body\n");
}
- else /* apply authorization rules if exists */
- if(subs->event->req_auth)
+ else
{
- if(subs->auth_rules_doc && subs->event->apply_auth_nbody
- && subs->event->apply_auth_nbody(notify_body,
- subs,&final_body)<0)
+ /* call aux_body_processing if exists */
+ if(subs->event->aux_body_processing)
{
- LM_ERR("in function apply_auth\n");
- goto error;
+ subs->event->aux_body_processing(subs, notify_body);
}
- if(final_body)
+
+ /* apply authorization rules if exists */
+ if(subs->event->req_auth)
{
- xmlFree(notify_body->s);
- pkg_free(notify_body);
- notify_body= final_body;
+ if(subs->auth_rules_doc && subs->event->apply_auth_nbody
+ && subs->event->apply_auth_nbody(notify_body,
+ subs,&final_body)<0)
+ {
+ LM_ERR("in function apply_auth\n");
+ goto error;
+ }
+ if(final_body)
+ {
+ xmlFree(notify_body->s);
+ pkg_free(notify_body);
+ notify_body= final_body;
+ }
}
}
}