diff --git a/contrib/src/pjproject/0001-rfc6544.patch b/contrib/src/pjproject/0001-rfc6544.patch index e8516b69c413c4547747805426fc9620ccdcfd68..756757ec591de17e45d85567635f6613b859d6d3 100644 --- a/contrib/src/pjproject/0001-rfc6544.patch +++ b/contrib/src/pjproject/0001-rfc6544.patch @@ -29,7 +29,7 @@ on behalf of Savoir-faire Linux. pjnath/src/pjnath-test/concur_test.c | 5 +- pjnath/src/pjnath-test/sess_auth.c | 14 +- pjnath/src/pjnath-test/stun_sock_test.c | 7 +- - pjnath/src/pjnath/ice_session.c | 597 +++++++++++-- + pjnath/src/pjnath/ice_session.c | 596 +++++++++++-- pjnath/src/pjnath/ice_strans.c | 747 +++++++++++++--- pjnath/src/pjnath/nat_detect.c | 7 +- pjnath/src/pjnath/stun_session.c | 19 +- @@ -42,7 +42,7 @@ on behalf of Savoir-faire Linux. pjnath/src/pjturn-srv/server.c | 2 +- pjsip-apps/src/samples/icedemo.c | 116 ++- pjsip/src/pjsua-lib/pjsua_core.c | 2 +- - 22 files changed, 2549 insertions(+), 424 deletions(-) + 22 files changed, 2548 insertions(+), 424 deletions(-) diff --git a/pjnath/include/pjnath/config.h b/pjnath/include/pjnath/config.h index fc1e27550..9b44c2645 100644 @@ -683,7 +683,7 @@ index fff4fad26..e7f8b84eb 100644 if (status != PJ_SUCCESS && status != PJ_EPENDING) { app_perror(" error: server sending data", status); diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c -index 2a4125bc5..b50a3d229 100644 +index 2a4125bc5..f27c2bab3 100644 --- a/pjnath/src/pjnath/ice_session.c +++ b/pjnath/src/pjnath/ice_session.c @@ -18,6 +18,7 @@ @@ -1289,7 +1289,7 @@ index 2a4125bc5..b50a3d229 100644 } pj_grp_lock_release(ice->grp_lock); -@@ -2181,6 +2449,205 @@ static pj_status_t on_stun_send_msg(pj_stun_session *sess, +@@ -2181,6 +2449,204 @@ static pj_status_t on_stun_send_msg(pj_stun_session *sess, return status; } @@ -1390,12 +1390,11 @@ index 2a4125bc5..b50a3d229 100644 + msg_data->data.req.ckid = current_check; + + pj_ice_sess_comp *comp = find_comp(ice, lcand->comp_id); -+ pj_status_t status_send_msg; + // Note that USERNAME and MESSAGE-INTEGRITY will be added by the + // STUN session. + + // Initiate STUN transaction to send the request -+ status_send_msg = pj_stun_session_send_msg(comp->stun_sess, msg_data, ++ status = pj_stun_session_send_msg(comp->stun_sess, msg_data, + PJ_FALSE, PJ_FALSE, &rcand->addr, + pj_sockaddr_get_len(&rcand->addr), + check->tdata); @@ -1415,11 +1414,11 @@ index 2a4125bc5..b50a3d229 100644 + * reached its timeout. + */ + check_set_state(ice, check,PJ_ICE_SESS_CHECK_STATE_NEEDS_RETRY, -+ status_send_msg); -+ } else if (status_send_msg == PJ_EBUSY /* EBUSY */) { ++ status); ++ } else if (status == PJ_EBUSY /* EBUSY */) { + check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_NEEDS_FIRST_PACKET, -+ status_send_msg); -+ } else if (status_send_msg != PJ_SUCCESS) { ++ status); ++ } else if (status != PJ_SUCCESS) { + + if (rcand->type == PJ_ICE_CAND_TYPE_RELAYED) { + char raddr[PJ_INET6_ADDRSTRLEN + 10]; @@ -1428,7 +1427,7 @@ index 2a4125bc5..b50a3d229 100644 + pj_sockaddr_print(&rcand->addr, raddr, sizeof(raddr), 3), status)); + } + check->tdata = NULL; -+ pjnath_perror(ice->obj_name, "Error sending STUN request (on peer connection)", status_send_msg); ++ pjnath_perror(ice->obj_name, "Error sending STUN request (on peer connection)", status); + pj_log_pop_indent(); + check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_FAILED, status); + on_check_complete(ice, check); @@ -1495,7 +1494,7 @@ index 2a4125bc5..b50a3d229 100644 /* This callback is called when outgoing STUN request completed */ static void on_stun_request_complete(pj_stun_session *stun_sess, -@@ -2411,7 +2878,9 @@ static void on_stun_request_complete(pj_stun_session *stun_sess, +@@ -2411,7 +2877,9 @@ static void on_stun_request_complete(pj_stun_session *stun_sess, &check->lcand->base_addr, &check->lcand->base_addr, pj_sockaddr_get_len(&xaddr->sockaddr), @@ -1506,7 +1505,7 @@ index 2a4125bc5..b50a3d229 100644 if (status != PJ_SUCCESS) { check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_FAILED, status); -@@ -2474,11 +2943,7 @@ static void on_stun_request_complete(pj_stun_session *stun_sess, +@@ -2474,11 +2942,7 @@ static void on_stun_request_complete(pj_stun_session *stun_sess, /* Perform 7.1.2.2.2. Updating Pair States. * This may terminate ICE processing. */ @@ -1519,7 +1518,7 @@ index 2a4125bc5..b50a3d229 100644 pj_grp_lock_release(ice->grp_lock); } -@@ -2673,9 +3138,13 @@ static pj_status_t on_stun_rx_request(pj_stun_session *sess, +@@ -2673,9 +3137,13 @@ static pj_status_t on_stun_rx_request(pj_stun_session *sess, msg_data->has_req_data = PJ_FALSE; /* Send the response */ @@ -1535,7 +1534,7 @@ index 2a4125bc5..b50a3d229 100644 /* * Handling early check. -@@ -2794,12 +3263,12 @@ static void handle_incoming_check(pj_ice_sess *ice, +@@ -2794,12 +3262,12 @@ static void handle_incoming_check(pj_ice_sess *ice, /* Just get candidate with the highest priority and same transport ID * for the specified component ID in the checklist. */