diff options
author | Benny Prijono <bennylp@teluu.com> | 2011-10-14 02:08:44 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2011-10-14 02:08:44 +0000 |
commit | d3f073e11620f76da99dd660356c3094c13cd810 (patch) | |
tree | fa366815fd4117247ad294a1bdbcee7bc1e259bb | |
parent | 2a7c23f6630314b2bee18066deb1442b8937671d (diff) |
Fixed #1387: Bug in printing user defined header in multipart message (thanks Luis Martin Gil for the patch)
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3815 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsip/sip_multipart.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pjsip/src/pjsip/sip_multipart.c b/pjsip/src/pjsip/sip_multipart.c index c4ae647e..45c7fcaa 100644 --- a/pjsip/src/pjsip/sip_multipart.c +++ b/pjsip/src/pjsip/sip_multipart.c @@ -81,10 +81,13 @@ static int multipart_print_body(struct pjsip_msg_body *msg_body, /* Print optional headers */ hdr = part->hdr.next; while (hdr != &part->hdr) { - int printed = pjsip_hdr_print_on((pjsip_hdr*)hdr, p, SIZE_LEFT()); + int printed = pjsip_hdr_print_on((pjsip_hdr*)hdr, p, + SIZE_LEFT()-2); if (printed < 0) return -1; p += printed; + *p++ = '\r'; + *p++ = '\n'; hdr = hdr->next; } |