Skip to content

Commit

Permalink
ice_strans: always return on error
Browse files Browse the repository at this point in the history
Else a random candidate will be chosen to send the data even if
the ICE originally fails. Moreover return code like EBUSY should
be correctly handled.

Change-Id: I6d45083c64f6de48ded2cea9a8eecebbaac62055
  • Loading branch information
Sébastien Blin authored and aberaud committed Oct 6, 2023
1 parent 1489db0 commit d01f2e5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pjnath/src/pjnath/ice_strans.c
Original file line number Diff line number Diff line change
Expand Up @@ -2104,10 +2104,8 @@ static pj_status_t send_data(pj_ice_strans *ice_st,
*/
if (ice_st->ice && ice_st->state <= PJ_ICE_STRANS_STATE_RUNNING) {
status = pj_ice_sess_send_data(ice_st->ice, comp_id, buf, data_len);
if (status == PJ_SUCCESS || status == PJ_EPENDING) {
pj_grp_lock_release(ice_st->grp_lock);
goto on_return;
}
pj_grp_lock_release(ice_st->grp_lock);
goto on_return;
}

pj_grp_lock_release(ice_st->grp_lock);
Expand Down

0 comments on commit d01f2e5

Please sign in to comment.