From 4919d2c9f095f3cc51adc974099619e2baa3f25e Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 11 Oct 2007 11:21:00 +0000 Subject: Ticket #397: Bug with handling large SIP message body (thanks Helmut Wolf) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1491 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip/sip_parser.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/pjsip/src/pjsip/sip_parser.c b/pjsip/src/pjsip/sip_parser.c index 9a0edcfa..d348dc57 100644 --- a/pjsip/src/pjsip/sip_parser.c +++ b/pjsip/src/pjsip/sip_parser.c @@ -875,21 +875,6 @@ PJ_DEF(pjsip_uri*) pjsip_parse_uri( pj_pool_t *pool, return NULL; } -/* Generic function to print message body. - * This assumes that the 'data' member points to a contigous memory where the - * actual body is laid. - */ -static int generic_print_body (pjsip_msg_body *msg_body, - char *buf, pj_size_t size) -{ - pjsip_msg_body *body = msg_body; - if (size < body->len) - return 0; - - pj_memcpy (buf, body->data, body->len); - return body->len; -} - /* Internal function to parse SIP message */ static pjsip_msg *int_parse_msg( pjsip_parse_ctx *ctx, pjsip_parser_err_report *err_list) @@ -1005,7 +990,7 @@ parse_headers: body->data = scanner->curptr; body->len = scanner->end - scanner->curptr; - body->print_body = &generic_print_body; + body->print_body = &pjsip_print_text_body; body->clone_data = &pjsip_clone_text_data; msg->body = body; -- cgit v1.2.3