summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-07-20 09:57:58 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-07-20 09:57:58 -0500
commitb93c602198dee2e8bc42ed16add4f3cc0fc698ee (patch)
tree370fa60fb49e6e2708a638f2cdbd4e2d8f4ce0ae
parent333a0fed33dccc5ae676dd78ef2e6e5331fbe1e1 (diff)
parente9daa3426102f7964949a7abaa34171de8c95269 (diff)
Merge "res_pjsip_mwi: remove unneeded check on endpoint's contacts."
-rw-r--r--res/res_pjsip_mwi.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index 9eba335b5..d86c96c74 100644
--- a/res/res_pjsip_mwi.c
+++ b/res/res_pjsip_mwi.c
@@ -976,38 +976,12 @@ static int create_mwi_subscriptions_for_endpoint(void *obj, void *arg, int flags
{
RAII_VAR(struct mwi_subscription *, aggregate_sub, NULL, ao2_cleanup);
struct ast_sip_endpoint *endpoint = obj;
- char *endpoint_aors, *aor_name, *mailboxes, *mailbox;
- struct ao2_container *contacts = NULL;
+ char *mailboxes, *mailbox;
if (ast_strlen_zero(endpoint->subscription.mwi.mailboxes)) {
return 0;
}
- endpoint_aors = ast_strdupa(endpoint->aors);
-
- while ((aor_name = ast_strip(strsep(&endpoint_aors, ",")))) {
- RAII_VAR(struct ast_sip_aor *, aor, ast_sip_location_retrieve_aor(aor_name), ao2_cleanup);
-
- if (!aor) {
- continue;
- }
-
- contacts = ast_sip_location_retrieve_aor_contacts(aor);
- if (!contacts || (ao2_container_count(contacts) == 0)) {
- ao2_cleanup(contacts);
- contacts = NULL;
- continue;
- }
-
- break;
- }
-
- if (!contacts) {
- return 0;
- }
-
- ao2_ref(contacts, -1);
-
if (endpoint->subscription.mwi.aggregate) {
aggregate_sub = mwi_subscription_alloc(endpoint, 0, NULL);
if (!aggregate_sub) {