Changeset 3906


Ignore:
Timestamp:
Dec 9, 2011 7:19:25 AM (8 years ago)
Author:
bennylp
Message:

Fixed #1416: Allow application to send data after ICE negotiation fails

Location:
pjproject/branches/1.x
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjmedia/src/pjmedia/transport_ice.c

    r3745 r3906  
    403403     * new ufrag/pwd pair. 
    404404     */ 
    405     if (!restart_session && pj_ice_strans_sess_is_complete(tp_ice->ice_st)) { 
     405    if (!restart_session && pj_ice_strans_sess_is_complete(tp_ice->ice_st) && 
     406        pj_ice_strans_get_state(tp_ice->ice_st) != PJ_ICE_STRANS_STATE_FAILED) 
     407    { 
    406408        const pj_ice_sess_check *check; 
    407409        char *attr_buf; 
     
    533535        } 
    534536 
    535     } else if (pj_ice_strans_has_sess(tp_ice->ice_st)) { 
     537    } else if (pj_ice_strans_has_sess(tp_ice->ice_st) && 
     538               pj_ice_strans_get_state(tp_ice->ice_st) != 
     539                        PJ_ICE_STRANS_STATE_FAILED) 
     540    { 
    536541        /* Encode all candidates to SDP media */ 
    537542        char *attr_buf; 
  • pjproject/branches/1.x/pjnath/src/pjnath/ice_strans.c

    r3596 r3906  
    11641164    /* If ICE is available, send data with ICE, otherwise send with the 
    11651165     * default candidate selected during initialization. 
     1166     * 
     1167     * https://trac.pjsip.org/repos/ticket/1416: 
     1168     * Once ICE has failed, also send data with the default candidate. 
    11661169     */ 
    1167     if (ice_st->ice) { 
     1170    if (ice_st->ice && ice_st->state < PJ_ICE_STRANS_STATE_FAILED) { 
    11681171        if (comp->turn_sock) { 
    11691172            pj_turn_sock_lock(comp->turn_sock); 
Note: See TracChangeset for help on using the changeset viewer.