* between accepting the subscription and sending the first
* NOTIFY...
*/
- ast_log(LOG_WARNING, "Unable to locate aor %s. MWI "
- "subscription failed.\n", name);
+ ast_log(LOG_WARNING, "Unable to locate aor %s. MWI subscription failed.\n",
+ name);
return NULL;
}
struct mwi_subscription *sub;
sub = mwi_create_subscription(endpoint, sip_sub);
-
if (!sub) {
return NULL;
}
}
aor = ast_sip_location_retrieve_aor(resource);
-
if (!aor) {
- ast_log(LOG_WARNING, "Unable to locate aor %s. MWI "
- "subscription failed.\n", resource);
+ ast_log(LOG_WARNING, "Unable to locate aor %s. MWI subscription failed.\n",
+ resource);
return 404;
}
if (ast_strlen_zero(aor->mailboxes)) {
- ast_log(LOG_NOTICE, "AOR %s has no configured mailboxes. "
- "MWI subscription failed\n", resource);
+ ast_log(LOG_NOTICE, "AOR %s has no configured mailboxes. MWI subscription failed.\n",
+ resource);
return 404;
}
}
}
+/*! \note Called with the unsolicited_mwi conainer lock held. */
static int create_mwi_subscriptions_for_endpoint(void *obj, void *arg, int flags)
{
RAII_VAR(struct mwi_subscription *, aggregate_sub, NULL, ao2_cleanup);
ao2_lock(unsolicited_mwi);
mwi_subs = ao2_find(unsolicited_mwi, endpoint_id, OBJ_SEARCH_KEY | OBJ_MULTIPLE | OBJ_NOLOCK | OBJ_UNLINK);
-
if (mwi_subs) {
for (; (mwi_sub = ao2_iterator_next(mwi_subs)); ao2_cleanup(mwi_sub)) {
unsubscribe(mwi_sub, NULL, 0);