Changeset 1805


Ignore:
Timestamp:
Feb 18, 2008 1:50:55 PM (11 years ago)
Author:
bennylp
Message:

Allow receiving SDP with lines terminated with LF instead of CRLF (thanks Juri Glass)

File:
1 edited

Legend:

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

    r1635 r1805  
    817817 
    818818    /* address */ 
    819     pj_scan_get_until_chr(scanner, " \t\r", &ses->origin.addr); 
     819    pj_scan_get_until_chr(scanner, " \t\r\n", &ses->origin.addr); 
    820820 
    821821    /* We've got what we're looking for, skip anything until newline */ 
     
    847847 
    848848    /* stop time */ 
    849     pj_scan_get_until_chr(scanner, " \t\r", &str); 
     849    pj_scan_get_until_chr(scanner, " \t\r\n", &str); 
    850850    ses->time.stop = pj_strtoul(&str); 
    851851 
     
    869869 
    870870    /* get anything until newline (including whitespaces). */ 
    871     pj_scan_get_until_ch(scanner, '\r', str); 
     871    pj_scan_get_until_chr(scanner, "\r\n", str); 
    872872 
    873873    /* newline. */ 
     
    892892 
    893893    /* address. */ 
    894     pj_scan_get_until_chr(scanner, " \t\r", &conn->addr); 
     894    pj_scan_get_until_chr(scanner, " \t\r\n", &conn->addr); 
    895895 
    896896    /* We've got what we're looking for, skip anything until newline */ 
     
    988988 
    989989        /* get value */ 
    990         if (*scanner->curptr != '\r') { 
    991             pj_scan_get_until_ch(scanner, '\r', &attr->value); 
     990        if (*scanner->curptr != '\r' && *scanner->curptr != '\n') { 
     991            pj_scan_get_until_chr(scanner, "\r\n", &attr->value); 
    992992        } else { 
    993993            attr->value.ptr = NULL; 
Note: See TracChangeset for help on using the changeset viewer.