Ignore:
Timestamp:
Jun 24, 2010 12:33:18 PM (14 years ago)
Author:
bennylp
Message:

Fixed #1081: Implement ICE option tag (RFC 5678)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c

    r3217 r3222  
    778778    if (*options & PJSIP_INV_REQUIRE_TIMER) 
    779779        *options |= PJSIP_INV_SUPPORT_TIMER; 
     780    if (*options & PJSIP_INV_REQUIRE_ICE) 
     781        *options |= PJSIP_INV_SUPPORT_ICE; 
    780782 
    781783    /* Get the message in rdata */ 
     
    949951        const pj_str_t STR_100REL = { "100rel", 6}; 
    950952        const pj_str_t STR_TIMER = { "timer", 5}; 
     953        const pj_str_t STR_ICE = { "ice", 3 }; 
    951954 
    952955        for (i=0; i<sup_hdr->count; ++i) { 
    953956            if (pj_stricmp(&sup_hdr->values[i], &STR_100REL)==0) 
    954957                rem_option |= PJSIP_INV_SUPPORT_100REL; 
    955             if (pj_stricmp(&sup_hdr->values[i], &STR_TIMER)==0) 
     958            else if (pj_stricmp(&sup_hdr->values[i], &STR_TIMER)==0) 
    956959                rem_option |= PJSIP_INV_SUPPORT_TIMER; 
     960            else if (pj_stricmp(&sup_hdr->values[i], &STR_ICE)==0) 
     961                rem_option |= PJSIP_INV_SUPPORT_ICE; 
    957962        } 
    958963    } 
     
    966971        const pj_str_t STR_REPLACES = { "replaces", 8 }; 
    967972        const pj_str_t STR_TIMER = { "timer", 5 }; 
     973        const pj_str_t STR_ICE = { "ice", 3 }; 
    968974        unsigned unsupp_cnt = 0; 
    969975        pj_str_t unsupp_tags[PJSIP_GENERIC_ARRAY_MAX_COUNT]; 
     
    987993                if (!supp) 
    988994                    unsupp_tags[unsupp_cnt++] = req_hdr->values[i]; 
     995            } else if ((*options & PJSIP_INV_SUPPORT_ICE) && 
     996                pj_stricmp(&req_hdr->values[i], &STR_ICE)==0) 
     997            { 
     998                rem_option |= PJSIP_INV_REQUIRE_ICE; 
    989999 
    9901000            } else if (!pjsip_endpt_has_capability(endpt, PJSIP_H_SUPPORTED, 
Note: See TracChangeset for help on using the changeset viewer.