[asterisk-commits] mmichelson: trunk r423463 - in /trunk: ./ res/res_pjsip_pubsub.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 18 13:56:57 CDT 2014
Author: mmichelson
Date: Thu Sep 18 13:56:54 2014
New Revision: 423463
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=423463
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
........
Merged revisions 423462 from http://svn.asterisk.org/svn/asterisk/branches/13
Modified:
trunk/ (props changed)
trunk/res/res_pjsip_pubsub.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.
Modified: trunk/res/res_pjsip_pubsub.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_pubsub.c?view=diff&rev=423463&r1=423462&r2=423463
==============================================================================
--- trunk/res/res_pjsip_pubsub.c (original)
+++ trunk/res/res_pjsip_pubsub.c Thu Sep 18 13:56:54 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 asterisk-commits
mailing list