[asterisk-commits] mmichelson: branch mmichelson/rls-rlmi r418258 - /team/mmichelson/rls-rlmi/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 9 18:29:25 CDT 2014
Author: mmichelson
Date: Wed Jul 9 18:29:20 2014
New Revision: 418258
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=418258
Log:
Add Require: eventlist to list subscription NOTIFY requests.
Modified:
team/mmichelson/rls-rlmi/res/res_pjsip_pubsub.c
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=418258&r1=418257&r2=418258
==============================================================================
--- team/mmichelson/rls-rlmi/res/res_pjsip_pubsub.c (original)
+++ team/mmichelson/rls-rlmi/res/res_pjsip_pubsub.c Wed Jul 9 18:29:20 2014
@@ -1666,6 +1666,17 @@
return body;
}
+static pjsip_require_hdr *create_require_eventlist(pj_pool_t *pool)
+{
+ pjsip_require_hdr *require;
+
+ require = pjsip_require_hdr_create(pool);
+ pj_strdup2(pool, &require->values[0], "eventlist");
+ require->count = 1;
+
+ return require;
+}
+
static int send_notify(struct sip_subscription_tree *sub_tree, int force_full_state)
{
pjsip_evsub *evsub = sub_tree->evsub;
@@ -1677,6 +1688,10 @@
}
tdata->msg->body = generate_notify_body(tdata->pool, sub_tree->root, force_full_state);
+ if (sub_tree->is_list) {
+ pjsip_require_hdr *require = create_require_eventlist(tdata->pool);
+ pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *) require);
+ }
if (sip_subscription_send_request(sub_tree, tdata)) {
pjsip_tx_data_dec_ref(tdata);
@@ -1765,17 +1780,6 @@
const char *ast_sip_subscription_get_resource_name(struct ast_sip_subscription *sub)
{
return sub->resource;
-}
-
-static pjsip_require_hdr *create_require_eventlist(pj_pool_t *pool)
-{
- pjsip_require_hdr *require;
-
- require = pjsip_require_hdr_create(pool);
- pj_strdup2(pool, &require->values[0], "eventlist");
- require->count = 1;
-
- return require;
}
static int sip_subscription_accept(struct sip_subscription_tree *sub_tree, pjsip_rx_data *rdata, int response)
More information about the asterisk-commits
mailing list