summaryrefslogtreecommitdiff
path: root/res/res_pjsip_dialog_info_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_dialog_info_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_dialog_info_body_generator.c')
-rw-r--r--res/res_pjsip_dialog_info_body_generator.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/res/res_pjsip_dialog_info_body_generator.c b/res/res_pjsip_dialog_info_body_generator.c
index d4ad2160a..848ec10e4 100644
--- a/res/res_pjsip_dialog_info_body_generator.c
+++ b/res/res_pjsip_dialog_info_body_generator.c
@@ -156,11 +156,6 @@ static int dialog_info_generate_body_content(void *body, void *data)
*/
#define MAX_STRING_GROWTHS 3
-/* When having pj_xml_print add the XML prolog to the output body the function will return 39
- * instead of -1 if the rest of the document can not be printed into the body.
- */
-#define XML_PROLOG 39
-
static void dialog_info_to_string(void *body, struct ast_str **str)
{
pj_xml_node *dialog_info = body;
@@ -169,13 +164,13 @@ static void dialog_info_to_string(void *body, struct ast_str **str)
do {
size = pj_xml_print(dialog_info, ast_str_buffer(*str), ast_str_size(*str), PJ_TRUE);
- 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, "dialog-info+xml body text too large\n");
return;
}