Ignore:
Timestamp:
Sep 25, 2013 4:57:26 AM (9 years ago)
Author:
nanang
Message:

Fix #1700: Added PJ_ICE_CAND_TYPE_MAX to represent the number ICE candidate types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/ice_session.c

    r4582 r4602  
    8181 
    8282/* Candidate type preference */ 
    83 static pj_uint8_t cand_type_prefs[4] = 
     83static pj_uint8_t cand_type_prefs[PJ_ICE_CAND_TYPE_MAX] = 
    8484{ 
    8585#if PJ_ICE_CAND_TYPE_PREF_BITS < 8 
     
    546546    unsigned i; 
    547547    PJ_ASSERT_RETURN(ice && prefs, PJ_EINVAL); 
    548     ice->prefs = (pj_uint8_t*) pj_pool_calloc(ice->pool, PJ_ARRAY_SIZE(prefs), 
     548    ice->prefs = (pj_uint8_t*) pj_pool_calloc(ice->pool, PJ_ICE_CAND_TYPE_MAX, 
    549549                                              sizeof(pj_uint8_t)); 
    550     for (i=0; i<4; ++i) { 
     550    for (i=0; i<PJ_ICE_CAND_TYPE_MAX; ++i) { 
    551551#if PJ_ICE_CAND_TYPE_PREF_BITS < 8 
    552552        pj_assert(prefs[i] < (2 << PJ_ICE_CAND_TYPE_PREF_BITS)); 
Note: See TracChangeset for help on using the changeset viewer.