[svn-commits] mmichelson: branch 13 r423462 - /branches/13/res/res_pjsip_pubsub.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Sep 18 13:31:05 CDT 2014
Author: mmichelson
Date: Thu Sep 18 13:31:01 2014
New Revision: 423462
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=423462
Log:
Add subscription state test events.
These are needed for a set of batched notification RLS tests that are
about to be committed to the testsuite.
Review: https://reviewboard.asterisk.org/r/3967
Modified:
branches/13/res/res_pjsip_pubsub.c
Modified: branches/13/res/res_pjsip_pubsub.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_pjsip_pubsub.c?view=diff&rev=423462&r1=423461&r2=423462
==============================================================================
--- branches/13/res/res_pjsip_pubsub.c (original)
+++ branches/13/res/res_pjsip_pubsub.c Thu Sep 18 13:31:01 2014
@@ -2075,6 +2075,9 @@
}
send_notify(sub_tree, 0);
+ ast_test_suite_event_notify("SUBSCRIPTION_STATE_CHANGED",
+ "Resource: %s",
+ sub_tree->root->resource);
sub_tree->notify_sched_id = -1;
ao2_cleanup(sub_tree);
return 0;
@@ -2125,8 +2128,11 @@
/* See the note in pubsub_on_rx_refresh() for why sub->tree is refbumped here */
ao2_ref(sub->tree, +1);
res = send_notify(sub->tree, 0);
+ ast_test_suite_event_notify(terminate ? "SUBSCRIPTION_TERMINATED" : "SUBSCRIPTION_STATE_CHANGED",
+ "Resource: %s",
+ sub->tree->root->resource);
ao2_ref(sub->tree, -1);
-
+
return res;
}
}
@@ -2569,6 +2575,9 @@
pjsip_evsub_terminate(sub_tree->evsub, PJ_TRUE);
}
send_notify(sub_tree, 1);
+ ast_test_suite_event_notify("SUBSCRIPTION_ESTABLISHED",
+ "Resource: %s",
+ sub_tree->root->resource);
}
resource_tree_destroy(&tree);
@@ -3112,6 +3121,10 @@
*p_st_code = 500;
}
+ ast_test_suite_event_notify(sub_tree->root->subscription_state == PJSIP_EVSUB_STATE_TERMINATED ?
+ "SUBSCRIPTION_TERMINATED" : "SUBSCRIPTION_REFRESHED",
+ "Resource: %s", sub_tree->root->resource);
+
if (sub_tree->is_list) {
pj_list_insert_before(res_hdr, create_require_eventlist(rdata->tp_info.pool));
}
@@ -3161,6 +3174,9 @@
set_state_terminated(sub_tree->root);
send_notify(sub_tree, 1);
+ ast_test_suite_event_notify("SUBSCRIPTION_TERMINATED",
+ "Resource: %s",
+ sub_tree->root->resource);
ao2_cleanup(sub_tree);
return 0;
More information about the svn-commits
mailing list