Changeset 2966 for pjproject/trunk/pjnath/src/pjnath/ice_strans.c
- Timestamp:
- Oct 25, 2009 9:02:07 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r2945 r2966 212 212 pj_stun_sock_cfg_default(&cfg->stun.cfg); 213 213 pj_turn_alloc_param_default(&cfg->turn.alloc_param); 214 pj_turn_sock_cfg_default(&cfg->turn.cfg); 214 215 215 216 pj_ice_sess_options_default(&cfg->opt); … … 274 275 stun_sock_cb.on_data_sent = &stun_on_data_sent; 275 276 277 /* Override component specific QoS settings, if any */ 278 if (ice_st->cfg.comp[comp_id-1].qos_type) { 279 ice_st->cfg.stun.cfg.qos_type = 280 ice_st->cfg.comp[comp_id-1].qos_type; 281 } 282 if (ice_st->cfg.comp[comp_id-1].qos_params.flags) { 283 pj_memcpy(&ice_st->cfg.stun.cfg.qos_params, 284 &ice_st->cfg.comp[comp_id-1].qos_params, 285 sizeof(ice_st->cfg.stun.cfg.qos_params)); 286 } 287 276 288 /* Create the STUN transport */ 277 289 status = pj_stun_sock_create(&ice_st->cfg.stun_cfg, NULL, … … 392 404 turn_sock_cb.on_state = &turn_on_state; 393 405 406 /* Override with component specific QoS settings, if any */ 407 if (ice_st->cfg.comp[comp_id-1].qos_type) { 408 ice_st->cfg.turn.cfg.qos_type = 409 ice_st->cfg.comp[comp_id-1].qos_type; 410 } 411 if (ice_st->cfg.comp[comp_id-1].qos_params.flags) { 412 pj_memcpy(&ice_st->cfg.turn.cfg.qos_params, 413 &ice_st->cfg.comp[comp_id-1].qos_params, 414 sizeof(ice_st->cfg.turn.cfg.qos_params)); 415 } 416 417 /* Create the TURN transport */ 394 418 status = pj_turn_sock_create(&ice_st->cfg.stun_cfg, ice_st->cfg.af, 395 419 ice_st->cfg.turn.conn_type, 396 &turn_sock_cb, 0, comp,397 &comp->turn_sock);420 &turn_sock_cb, &ice_st->cfg.turn.cfg, 421 comp, &comp->turn_sock); 398 422 if (status != PJ_SUCCESS) { 399 423 return status; … … 454 478 return status; 455 479 456 PJ_ASSERT_RETURN(comp_cnt && cb && p_ice_st, PJ_EINVAL); 480 PJ_ASSERT_RETURN(comp_cnt && cb && p_ice_st && 481 comp_cnt <= PJ_ICE_MAX_COMP , PJ_EINVAL); 457 482 458 483 if (name == NULL)
Note: See TracChangeset
for help on using the changeset viewer.