Changeset 2695


Ignore:
Timestamp:
May 12, 2009 3:55:09 PM (11 years ago)
Author:
bennylp
Message:

Ticket #842: Error parsing status line in sipfrag message body in call transfer scenario (thanks Tomáš Valenta for the report!)

Location:
pjproject/trunk/pjsip/src
Files:
3 edited

Legend:

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

    r2522 r2695  
    15891589 
    15901590    pj_bzero(status_line, sizeof(*status_line)); 
    1591     pj_scan_init(&scanner, buf, size, 0, &on_syntax_error); 
     1591    pj_scan_init(&scanner, buf, size, PJ_SCAN_AUTOSKIP_WS_HEADER,  
     1592                 &on_syntax_error); 
    15921593 
    15931594    PJ_TRY { 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r2643 r2695  
    34163416            body = msg->body; 
    34173417            if (!body) { 
    3418                 PJ_LOG(4,(THIS_FILE,  
     3418                PJ_LOG(2,(THIS_FILE,  
    34193419                          "Warning: received NOTIFY without message body")); 
    34203420                return; 
     
    34253425                pj_stricmp2(&body->content_type.subtype, "sipfrag") != 0) 
    34263426            { 
    3427                 PJ_LOG(4,(THIS_FILE,  
     3427                PJ_LOG(2,(THIS_FILE,  
    34283428                          "Warning: received NOTIFY with non message/sipfrag " 
    34293429                          "content")); 
     
    34353435                                             &status_line); 
    34363436            if (status != PJ_SUCCESS) { 
    3437                 PJ_LOG(4,(THIS_FILE,  
     3437                PJ_LOG(2,(THIS_FILE,  
    34383438                          "Warning: received NOTIFY with invalid " 
    34393439                          "message/sipfrag content")); 
  • pjproject/trunk/pjsip/src/test/msg_test.c

    r2660 r2695  
    816816static pj_status_t simple_test(void) 
    817817{ 
     818    char stbuf[] = "SIP/2.0 180 Ringing like it never rings before"; 
    818819    unsigned i; 
     820    pjsip_status_line st_line; 
    819821    pj_status_t status; 
    820822 
    821823    PJ_LOG(3,(THIS_FILE, "  simple test..")); 
     824     
     825    status = pjsip_parse_status_line(stbuf, pj_ansi_strlen(stbuf), &st_line); 
     826    if (status != PJ_SUCCESS) 
     827        return status; 
     828 
    822829    for (i=0; i<PJ_ARRAY_SIZE(test_array); ++i) { 
    823830        pj_pool_t *pool; 
Note: See TracChangeset for help on using the changeset viewer.