Changeset 1557 for pjproject/trunk


Ignore:
Timestamp:
Nov 7, 2007 1:03:11 PM (17 years ago)
Author:
bennylp
Message:

Parse ICE candidate attribute without case sensitive for more robustness

File:
1 edited

Legend:

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

    r1436 r1557  
    363363    if (!token) 
    364364        goto on_return; 
    365     if (strcmp(token, "UDP") != 0) 
     365    if (pj_ansi_stricmp(token, "UDP") != 0) 
    366366        goto on_return; 
    367367 
     
    389389    if (!token) 
    390390        goto on_return; 
    391     if (strcmp(token, "typ") != 0) 
     391    if (pj_ansi_stricmp(token, "typ") != 0) 
    392392        goto on_return; 
    393393 
     
    397397        goto on_return; 
    398398 
    399     if (strcmp(token, "host") == 0) { 
     399    if (pj_ansi_stricmp(token, "host") == 0) { 
    400400        cand->type = PJ_ICE_CAND_TYPE_HOST; 
    401401 
    402     } else if (strcmp(token, "srflx") == 0) { 
     402    } else if (pj_ansi_stricmp(token, "srflx") == 0) { 
    403403        cand->type = PJ_ICE_CAND_TYPE_SRFLX; 
    404404 
    405     } else if (strcmp(token, "relay") == 0) { 
     405    } else if (pj_ansi_stricmp(token, "relay") == 0) { 
    406406        cand->type = PJ_ICE_CAND_TYPE_RELAYED; 
    407407 
    408     } else if (strcmp(token, "prflx") == 0) { 
     408    } else if (pj_ansi_stricmp(token, "prflx") == 0) { 
    409409        cand->type = PJ_ICE_CAND_TYPE_PRFLX; 
    410410 
     
    511511 
    512512        /* Detect if remote is ICE lite */ 
    513         if (pj_strcmp(&attr->name, &STR_ICE_LITE)==0) { 
     513        if (pj_stricmp(&attr->name, &STR_ICE_LITE)==0) { 
    514514            remote_is_lite = PJ_TRUE; 
    515515            continue; 
     
    517517 
    518518        /* Detect if remote has reported ICE mismatch */ 
    519         if (pj_strcmp(&attr->name, &STR_ICE_MISMATCH)==0) { 
     519        if (pj_stricmp(&attr->name, &STR_ICE_MISMATCH)==0) { 
    520520            ice_mismatch = PJ_TRUE; 
    521521            continue; 
    522522        } 
    523523 
    524         if (pj_strcmp(&attr->name, &STR_CANDIDATE)!=0) 
     524        if (pj_stricmp(&attr->name, &STR_CANDIDATE)!=0) 
    525525            continue; 
    526526 
Note: See TracChangeset for help on using the changeset viewer.