From bb2c9ea0b70a428dd115da5fa2c0e6482d9db7dc Mon Sep 17 00:00:00 2001 From: lazedo Date: Mon, 4 Jan 2016 16:12:46 +0000 Subject: [PATCH] presence_xml: fix pres_agg_nbody_empty we were sending the presence element without the entity attribute. it seems some UAs dislike this --- modules/presence_xml/notify_body.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/presence_xml/notify_body.c b/modules/presence_xml/notify_body.c index 2730038ae89..f10305cfb31 100644 --- a/modules/presence_xml/notify_body.c +++ b/modules/presence_xml/notify_body.c @@ -58,15 +58,20 @@ void free_xml_body(char* body) body= NULL; } -#define PRESENCE_EMPTY_BODY_SIZE 512 +#define PRESENCE_EMPTY_BODY_SIZE 1024 -#define PRESENCE_EMPTY_BODY " \ -\ +#define PRESENCE_EMPTY_BODY "\ + \ +\ \ open\ \ \ Available\ +\ +\ +Available\ +\ " str* pres_agg_nbody_empty(str* pres_user, str* pres_domain) @@ -78,7 +83,7 @@ str* pres_agg_nbody_empty(str* pres_user, str* pres_domain) str* body_array = (str*)pkg_malloc(sizeof(str)); char* body = (char*)pkg_malloc(PRESENCE_EMPTY_BODY_SIZE); - sprintf(body, PRESENCE_EMPTY_BODY); + sprintf(body, PRESENCE_EMPTY_BODY, pres_user->len, pres_user->s); body_array->s = body; body_array->len = strlen(body);