Skip to content

Commit

Permalink
Merge pull request #122 from dsandras/ds-fix-dialog-info-entity
Browse files Browse the repository at this point in the history
This patch fixes the entity URI in XML documents to contain "sip:".
  • Loading branch information
bogdan-iancu committed Nov 23, 2013
2 parents ded0559 + d18fcd5 commit 377e757
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/presence_dialoginfo/notify_body.c
Expand Up @@ -175,10 +175,11 @@ str* agregate_xmls(str* pres_user, str* pres_domain, str** body_array, int n, in
LM_ERR("entity URI too long, maximum=%d\n", MAX_URI_SIZE);
return NULL;
}
memcpy(buf, pres_user->s, pres_user->len);
buf[pres_user->len] = '@';
memcpy(buf + pres_user->len + 1, pres_domain->s, pres_domain->len);
buf[pres_user->len + 1 + pres_domain->len]= '\0';
memcpy(buf, "sip:", 4);
memcpy(buf+4, pres_user->s, pres_user->len);
buf[pres_user->len+4] = '@';
memcpy(buf + pres_user->len + 5, pres_domain->s, pres_domain->len);
buf[pres_user->len + 5 + pres_domain->len]= '\0';

doc = xmlNewDoc(BAD_CAST "1.0");
if(doc==0)
Expand Down

0 comments on commit 377e757

Please sign in to comment.