Changeset 2354


Ignore:
Timestamp:
Oct 21, 2008 4:48:49 PM (15 years ago)
Author:
nanang
Message:

Ticket #666: Updated SDP parser to allow trailing newlines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/sdp.c

    r2076 r2354  
    11111111                    break; 
    11121112                case 13: 
    1113                     /* Allow empty newline at the end of the message */ 
    1114                     pj_scan_get_char(&scanner); 
    1115                     /* Continue below */ 
    11161113                case 10: 
    11171114                    pj_scan_get_char(&scanner); 
    1118                     if (!pj_scan_is_eof(&scanner)) { 
    1119                         ctx.last_error = PJMEDIA_SDP_EINSDP; 
    1120                         on_scanner_error(&scanner); 
     1115                    /* Allow empty newlines at the end of the message */ 
     1116                    while (!pj_scan_is_eof(&scanner)) { 
     1117                        if (*scanner.curptr != 13 && *scanner.curptr != 10) { 
     1118                            ctx.last_error = PJMEDIA_SDP_EINSDP; 
     1119                            on_scanner_error(&scanner); 
     1120                        } 
     1121                        pj_scan_get_char(&scanner); 
    11211122                    } 
    11221123                    break; 
Note: See TracChangeset for help on using the changeset viewer.