summaryrefslogtreecommitdiff
path: root/res/res_pjsip_xpidf_body_generator.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2014-08-07 19:26:32 +0000
committerMark Michelson <mmichelson@digium.com>2014-08-07 19:26:32 +0000
commit99d0bccd350cd42941c195667a5733ca6a4368a4 (patch)
treedf35d3d85a37e598bbfd8c7604ab65248cca19df /res/res_pjsip_xpidf_body_generator.c
parentea7d4ab09e05a2ebffc8ec81acb3c242d78a3732 (diff)
Add support for RFC 4662 resource list subscriptions.
This commit adds the ability for a user to configure a resource list in pjsip.conf. Subscribing to this list simultaneously subscribes the subscriber to all resources listed. This has the potential to reduce the amount of SIP traffic when loads of subscribers on a system attempt to subscribe to each others' states. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_xpidf_body_generator.c')
-rw-r--r--res/res_pjsip_xpidf_body_generator.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/res/res_pjsip_xpidf_body_generator.c b/res/res_pjsip_xpidf_body_generator.c
index 4e0587d35..38e036a7b 100644
--- a/res/res_pjsip_xpidf_body_generator.c
+++ b/res/res_pjsip_xpidf_body_generator.c
@@ -98,7 +98,6 @@ static int xpidf_generate_body_content(void *body, void *data)
}
#define MAX_STRING_GROWTHS 5
-#define XML_PROLOG 39
static void xpidf_to_string(void *body, struct ast_str **str)
{
@@ -108,13 +107,13 @@ static void xpidf_to_string(void *body, struct ast_str **str)
do {
size = pjxpidf_print(pres, ast_str_buffer(*str), ast_str_size(*str));
- if (size == XML_PROLOG) {
+ if (size == AST_PJSIP_XML_PROLOG_LEN) {
ast_str_make_space(str, ast_str_size(*str) * 2);
++growths;
}
- } while (size == XML_PROLOG && growths < MAX_STRING_GROWTHS);
+ } while (size == AST_PJSIP_XML_PROLOG_LEN && growths < MAX_STRING_GROWTHS);
- if (size == XML_PROLOG) {
+ if (size == AST_PJSIP_XML_PROLOG_LEN) {
ast_log(LOG_WARNING, "XPIDF body text too large\n");
return;
}