Changeset 1540


Ignore:
Timestamp:
Nov 3, 2007 3:41:30 AM (17 years ago)
Author:
bennylp
Message:

Allow empty reason phrase in SIP responses during parsing (thanks Roman Puls)

File:
1 edited

Legend:

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

    r1491 r1540  
    14631463    pj_scan_get( scanner, &pconst.pjsip_DIGIT_SPEC, &token); 
    14641464    status_line->code = pj_strtoul(&token); 
    1465     pj_scan_get( scanner, &pconst.pjsip_NOT_NEWLINE, &status_line->reason); 
     1465    if (*scanner->curptr != '\r' && *scanner->curptr != '\n') 
     1466        pj_scan_get( scanner, &pconst.pjsip_NOT_NEWLINE, &status_line->reason); 
     1467    else 
     1468        status_line->reason.slen=0, status_line->reason.ptr=NULL; 
    14661469    pj_scan_get_newline( scanner ); 
    14671470} 
Note: See TracChangeset for help on using the changeset viewer.