Changeset 1491


Ignore:
Timestamp:
Oct 11, 2007 11:21:00 AM (12 years ago)
Author:
bennylp
Message:

Ticket #397: Bug with handling large SIP message body (thanks Helmut Wolf)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_parser.c

    r1417 r1491  
    876876} 
    877877 
    878 /* Generic function to print message body. 
    879  * This assumes that the 'data' member points to a contigous memory where the  
    880  * actual body is laid. 
    881  */ 
    882 static int generic_print_body (pjsip_msg_body *msg_body,  
    883                                char *buf, pj_size_t size) 
    884 { 
    885     pjsip_msg_body *body = msg_body; 
    886     if (size < body->len) 
    887         return 0; 
    888  
    889     pj_memcpy (buf, body->data, body->len); 
    890     return body->len; 
    891 } 
    892  
    893878/* Internal function to parse SIP message */ 
    894879static pjsip_msg *int_parse_msg( pjsip_parse_ctx *ctx, 
     
    1006991            body->data = scanner->curptr; 
    1007992            body->len = scanner->end - scanner->curptr; 
    1008             body->print_body = &generic_print_body; 
     993            body->print_body = &pjsip_print_text_body; 
    1009994            body->clone_data = &pjsip_clone_text_data; 
    1010995 
Note: See TracChangeset for help on using the changeset viewer.