[Asterisk-code-review] res pjsip: improve realtime performance (asterisk[13])
Alexei Gradinari
asteriskteam at digium.com
Fri Apr 15 09:43:02 CDT 2016
Alexei Gradinari has uploaded a new change for review.
https://gerrit.asterisk.org/2622
Change subject: res_pjsip: improve realtime performance
......................................................................
res_pjsip: improve realtime performance
This patch modified pjsip_options to retrieve contacts only
if aor has permament contacts.
ASTERISK-25835
Change-Id: I1831fa46c4578eae5a3e574ee3362fddf08a1f05
---
M res/res_pjsip/pjsip_options.c
1 file changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/22/2622/1
diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c
index b8d38ed..40d3924 100644
--- a/res/res_pjsip/pjsip_options.c
+++ b/res/res_pjsip/pjsip_options.c
@@ -1065,10 +1065,12 @@
struct ast_sip_aor *aor = obj;
struct ao2_container *contacts;
- contacts = ast_sip_location_retrieve_aor_contacts(aor);
- if (contacts) {
- ao2_callback(contacts, OBJ_NODATA, qualify_and_schedule_cb, aor);
- ao2_ref(contacts, -1);
+ if (aor->permanent_contacts) {
+ contacts = ast_sip_location_retrieve_aor_contacts(aor);
+ if (contacts) {
+ ao2_callback(contacts, OBJ_NODATA, qualify_and_schedule_cb, aor);
+ ao2_ref(contacts, -1);
+ }
}
return 0;
--
To view, visit https://gerrit.asterisk.org/2622
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1831fa46c4578eae5a3e574ee3362fddf08a1f05
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
More information about the asterisk-code-review
mailing list