Changeset 2714 for pjproject/branches/projects/sipit24
- Timestamp:
- May 18, 2009 11:49:46 PM (16 years ago)
- Location:
- pjproject/branches/projects/sipit24/pjnath
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/sipit24/pjnath/include/pjnath/config.h
r2705 r2714 260 260 #define PJ_ICE_MAX_COMP (2<<PJ_ICE_COMP_BITS) 261 261 262 /** 263 * Use the priority value according to the ice-draft. 264 */ 265 #ifndef PJNATH_ICE_PRIO_STD 266 # define PJNATH_ICE_PRIO_STD 1 267 #endif 268 262 269 263 270 /** … … 265 272 */ 266 273 #ifndef PJ_ICE_CAND_TYPE_PREF_BITS 267 # define PJ_ICE_CAND_TYPE_PREF_BITS 2 274 # if PJNATH_ICE_PRIO_STD 275 # define PJ_ICE_CAND_TYPE_PREF_BITS 8 276 # else 277 # define PJ_ICE_CAND_TYPE_PREF_BITS 2 278 # endif 268 279 #endif 269 280 -
pjproject/branches/projects/sipit24/pjnath/src/pjnath/ice_session.c
r2708 r2714 30 30 #include <pj/string.h> 31 31 32 33 32 /* String names for candidate types */ 34 33 static const char *cand_type_names[] = … … 243 242 const pj_sockaddr *base_addr) 244 243 { 245 #if 0244 #if PJNATH_ICE_PRIO_STD 246 245 char buf[64]; 247 246 pj_uint32_t val; … … 659 658 pj_uint32_t comp_id) 660 659 { 661 #if 0660 #if PJNATH_ICE_PRIO_STD 662 661 return ((ice->prefs[type] & 0xFF) << 24) + 663 662 ((local_pref & 0xFFFF) << 8) + … … 1638 1637 1639 1638 /* Add PRIORITY */ 1639 #if PJNATH_ICE_PRIO_STD 1640 prio = CALC_CAND_PRIO(ice, PJ_ICE_CAND_TYPE_PRFLX, 65535, 1641 lcand->comp_id); 1642 #else 1640 1643 prio = CALC_CAND_PRIO(ice, PJ_ICE_CAND_TYPE_PRFLX, 0, 1641 1644 lcand->comp_id); 1645 #endif 1642 1646 pj_stun_msg_add_uint_attr(check->tdata->pool, check->tdata->msg, 1643 1647 PJ_STUN_ATTR_PRIORITY, prio); -
pjproject/branches/projects/sipit24/pjnath/src/pjnath/ice_strans.c
r2707 r2714 51 51 * specify preference among candidates with the same type. Since 52 52 * we don't have the facility to specify that, we'll just set it 53 * all to zero. 54 */ 55 #define SRFLX_PREF 0 56 #define HOST_PREF 0 57 #define RELAY_PREF 0 53 * all to the same value. 54 */ 55 #if PJNATH_ICE_PRIO_STD 56 # define SRFLX_PREF 65535 57 # define HOST_PREF 65535 58 # define RELAY_PREF 65535 59 #else 60 # define SRFLX_PREF 0 61 # define HOST_PREF 0 62 # define RELAY_PREF 0 63 #endif 64 58 65 59 66 /* The candidate type preference when STUN candidate is used */ 60 67 static pj_uint8_t srflx_pref_table[4] = 61 68 { 69 #if PJNATH_ICE_PRIO_STD 70 100, /**< PJ_ICE_HOST_PREF */ 71 126, /**< PJ_ICE_SRFLX_PREF */ 72 110, /**< PJ_ICE_PRFLX_PREF */ 73 0 /**< PJ_ICE_RELAYED_PREF */ 74 #else 62 75 /* Keep it to 2 bits */ 63 76 1, /**< PJ_ICE_HOST_PREF */ … … 65 78 3, /**< PJ_ICE_PRFLX_PREF */ 66 79 0 /**< PJ_ICE_RELAYED_PREF */ 80 #endif 67 81 }; 68 82
Note: See TracChangeset
for help on using the changeset viewer.