Changeset 2035


Ignore:
Timestamp:
Jun 20, 2008 12:31:49 AM (11 years ago)
Author:
bennylp
Message:

Make SDP parser more lenient by ignoring first newlines.

File:
1 edited

Legend:

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

    r2032 r2035  
    10641064    session = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_session); 
    10651065    PJ_ASSERT_RETURN(session != NULL, PJ_ENOMEM); 
     1066 
     1067    /* Ignore leading newlines */ 
     1068    while (*scanner.curptr=='\r' || *scanner.curptr=='\n') 
     1069        pj_scan_get_char(&scanner); 
    10661070 
    10671071    PJ_TRY { 
     
    11121116                    pj_scan_get_char(&scanner); 
    11131117                    if (!pj_scan_is_eof(&scanner)) { 
     1118                        ctx.last_error = PJMEDIA_SDP_EINSDP; 
    11141119                        on_scanner_error(&scanner); 
    11151120                    } 
Note: See TracChangeset for help on using the changeset viewer.