[asterisk-commits] mmichelson: branch mmichelson/rls-rlmi r420288 - in /team/mmichelson/rls-rlmi...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 6 17:34:02 CDT 2014
Author: mmichelson
Date: Wed Aug 6 17:34:00 2014
New Revision: 420288
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=420288
Log:
Resolve conflict and reset automerge.
Modified:
team/mmichelson/rls-rlmi/ (props changed)
team/mmichelson/rls-rlmi/res/res_pjsip_exten_state.c
team/mmichelson/rls-rlmi/res/res_pjsip_mwi.c
team/mmichelson/rls-rlmi/res/res_pjsip_pubsub.c
Propchange: team/mmichelson/rls-rlmi/
------------------------------------------------------------------------------
automerge = *
Propchange: team/mmichelson/rls-rlmi/
------------------------------------------------------------------------------
--- branch-12-blocked (original)
+++ branch-12-blocked Wed Aug 6 17:34:00 2014
@@ -1,1 +1,1 @@
-/branches/12:398559,398578,399306,401391,403291,403779-403780,405350,405587,409762,410006,411512,411809,413282,415838,419316,419442,420060
+/branches/12:398559,398578,399306,401391,403291,403779-403780,405350,405587,409762,410006,411512,411809,413282,415838,419316,419442,420060,420262
Propchange: team/mmichelson/rls-rlmi/
------------------------------------------------------------------------------
--- rls-notify-integrated (original)
+++ rls-notify-integrated Wed Aug 6 17:34:00 2014
@@ -1,1 +1,1 @@
-/team/group/rls:1-420250
+/team/group/rls:1-420281
Propchange: team/mmichelson/rls-rlmi/
------------------------------------------------------------------------------
--- rls-rlmi-integrated (original)
+++ rls-rlmi-integrated Wed Aug 6 17:34:00 2014
@@ -1,1 +1,1 @@
-/team/mmichelson/rls-notify:1-420251
+/team/mmichelson/rls-notify:1-420287
Propchange: team/mmichelson/rls-rlmi/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Aug 6 17:34:00 2014
@@ -1,1 +1,1 @@
-/trunk:1-420240
+/trunk:1-420269
Modified: team/mmichelson/rls-rlmi/res/res_pjsip_exten_state.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/rls-rlmi/res/res_pjsip_exten_state.c?view=diff&rev=420288&r1=420287&r2=420288
==============================================================================
--- team/mmichelson/rls-rlmi/res/res_pjsip_exten_state.c (original)
+++ team/mmichelson/rls-rlmi/res/res_pjsip_exten_state.c Wed Aug 6 17:34:00 2014
@@ -200,12 +200,8 @@
task_data->exten_state_data.presence_subtype = ast_strdup(info->presence_subtype);
task_data->exten_state_data.presence_message = ast_strdup(info->presence_message);
task_data->exten_state_data.user_agent = ast_strdup(exten_state_sub->user_agent);
- task_data->exten_state_data.device_state_info = info->device_state_info;
+ task_data->exten_state_data.device_state_info = ao2_bump(info->device_state_info);
task_data->exten_state_data.sub = exten_state_sub->sip_sub;
-
- if (task_data->exten_state_data.device_state_info) {
- ao2_ref(task_data->exten_state_data.device_state_info, +1);
- }
ast_sip_subscription_get_local_uri(exten_state_sub->sip_sub,
task_data->exten_state_data.local, sizeof(task_data->exten_state_data.local));
@@ -396,7 +392,6 @@
struct exten_state_subscription *exten_state_sub)
{
struct ast_sip_exten_state_data *exten_state_data;
- struct ao2_container *info;
char *subtype = NULL;
char *message = NULL;
@@ -420,8 +415,10 @@
sizeof(exten_state_data->remote));
exten_state_data->sub = sip_sub;
- if ((exten_state_data->exten_state = ast_extension_state_extended(
- NULL, exten_state_sub->context, exten_state_sub->exten, &info)) < 0) {
+ exten_state_data->exten_state = ast_extension_state_extended(
+ NULL, exten_state_sub->context, exten_state_sub->exten,
+ &exten_state_data->device_state_info);
+ if (exten_state_data->exten_state < 0) {
ao2_cleanup(exten_state_data);
return NULL;
}
@@ -433,7 +430,6 @@
return NULL;
}
- exten_state_data->device_state_info = info;
return exten_state_data;
}
Modified: team/mmichelson/rls-rlmi/res/res_pjsip_mwi.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/rls-rlmi/res/res_pjsip_mwi.c?view=diff&rev=420288&r1=420287&r2=420288
==============================================================================
--- team/mmichelson/rls-rlmi/res/res_pjsip_mwi.c (original)
+++ team/mmichelson/rls-rlmi/res/res_pjsip_mwi.c Wed Aug 6 17:34:00 2014
@@ -47,6 +47,8 @@
#define MWI_TYPE "application"
#define MWI_SUBTYPE "simple-message-summary"
+
+#define MWI_DATASTORE "MWI datastore"
static void mwi_subscription_shutdown(struct ast_sip_subscription *sub);
static void mwi_to_ami(struct ast_sip_subscription *sub, struct ast_str **buf);
@@ -458,7 +460,7 @@
{
struct mwi_subscription *mwi_sub;
RAII_VAR(struct ast_datastore *, mwi_datastore,
- ast_sip_subscription_get_datastore(sub, "MWI datastore"), ao2_cleanup);
+ ast_sip_subscription_get_datastore(sub, MWI_DATASTORE), ao2_cleanup);
if (!mwi_datastore) {
return;
@@ -474,7 +476,7 @@
{
RAII_VAR(struct ast_datastore *, mwi_datastore, NULL, ao2_cleanup);
- mwi_datastore = ast_sip_subscription_alloc_datastore(&mwi_ds_info, "MWI datastore");
+ mwi_datastore = ast_sip_subscription_alloc_datastore(&mwi_ds_info, MWI_DATASTORE);
if (!mwi_datastore) {
return -1;
}
@@ -698,7 +700,6 @@
ao2_cleanup(sub);
ao2_cleanup(endpoint);
return 0;
-
}
static void *mwi_get_notify_data(struct ast_sip_subscription *sub)
@@ -707,7 +708,7 @@
struct mwi_subscription *mwi_sub;
struct ast_datastore *mwi_datastore;
- mwi_datastore = ast_sip_subscription_get_datastore(sub, "MWI datastore");
+ mwi_datastore = ast_sip_subscription_get_datastore(sub, MWI_DATASTORE);
if (!mwi_datastore) {
return NULL;
}
@@ -748,7 +749,7 @@
{
struct mwi_subscription *mwi_sub;
RAII_VAR(struct ast_datastore *, mwi_datastore,
- ast_sip_subscription_get_datastore(sub, "MWI datastore"), ao2_cleanup);
+ ast_sip_subscription_get_datastore(sub, MWI_DATASTORE), ao2_cleanup);
if (!mwi_datastore) {
return;
Modified: team/mmichelson/rls-rlmi/res/res_pjsip_pubsub.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/rls-rlmi/res/res_pjsip_pubsub.c?view=diff&rev=420288&r1=420287&r2=420288
==============================================================================
--- team/mmichelson/rls-rlmi/res/res_pjsip_pubsub.c (original)
+++ team/mmichelson/rls-rlmi/res/res_pjsip_pubsub.c Wed Aug 6 17:34:00 2014
@@ -1058,7 +1058,10 @@
continue;
}
- AST_VECTOR_APPEND(&sub->children, child);
+ if (AST_VECTOR_APPEND(&sub->children, child)) {
+ ast_debug(1, "Child subscription to resource %s could not be appended\n",
+ child_node->resource);
+ }
}
return sub;
@@ -1085,6 +1088,7 @@
{
struct sip_subscription_tree *sub_tree = obj;
+ remove_subscription(sub_tree);
subscription_persistence_remove(sub_tree);
ao2_cleanup(sub_tree->endpoint);
@@ -1096,7 +1100,6 @@
ao2_cleanup(sub_tree->root);
ast_taskprocessor_unreference(sub_tree->serializer);
- remove_subscription(sub_tree);
}
static void subscription_setup_dialog(struct sip_subscription_tree *sub_tree, pjsip_dialog *dlg)
@@ -1401,7 +1404,7 @@
struct ast_sip_subscription *ast_sip_create_subscription(const struct ast_sip_subscription_handler *handler,
struct ast_sip_endpoint *endpoint, const char *resource)
{
- struct ast_sip_subscription *sub = ao2_alloc(sizeof(*sub) + strlen(resource) + 1, subscription_destructor);
+ struct ast_sip_subscription *sub;
pjsip_dialog *dlg;
struct ast_sip_contact *contact;
pj_str_t event;
@@ -1424,7 +1427,7 @@
if (!contact || ast_strlen_zero(contact->uri)) {
ast_log(LOG_WARNING, "No contacts configured for endpoint %s. Unable to create SIP subsription\n",
ast_sorcery_object_get_id(endpoint));
- ao2_ref(sub, -1);
+ ao2_ref(sub_tree, -1);
ao2_cleanup(contact);
return NULL;
}
@@ -1433,15 +1436,13 @@
ao2_cleanup(contact);
if (!dlg) {
ast_log(LOG_WARNING, "Unable to create dialog for SIP subscription\n");
- ao2_ref(sub, -1);
+ ao2_ref(sub_tree, -1);
return NULL;
}
pj_cstr(&event, handler->event_name);
pjsip_evsub_create_uac(dlg, &pubsub_cb, &event, 0, &sub_tree->evsub);
subscription_setup_dialog(sub_tree, dlg);
-
- add_subscription(sub_tree);
evsub = sub_tree->evsub;
@@ -1453,6 +1454,7 @@
* need to decrease the reference count of sub here.
*/
pjsip_evsub_terminate(evsub, PJ_TRUE);
+ ao2_ref(sub_tree, -1);
return NULL;
}
More information about the asterisk-commits
mailing list