Skip to content

support ice-lite #1753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/source/PeerConnection/PeerConnection.c
Original file line number Diff line number Diff line change
@@ -1010,6 +1010,7 @@ STATUS setRemoteDescription(PRtcPeerConnection pPeerConnection, PRtcSessionDescr
ENTERS();
STATUS retStatus = STATUS_SUCCESS;
PCHAR remoteIceUfrag = NULL, remoteIcePwd = NULL;
BOOL controlling = FALSE;
UINT32 i, j;

CHK(pPeerConnection != NULL, STATUS_NULL_ARG);
@@ -1024,6 +1025,7 @@ STATUS setRemoteDescription(PRtcPeerConnection pPeerConnection, PRtcSessionDescr
NULLABLE_SET_VALUE(pKvsPeerConnection->canTrickleIce, FALSE);

CHK_STATUS(deserializeSessionDescription(pSessionDescription, pSessionDescriptionInit->sdp));
controlling = pKvsPeerConnection->isOffer;

for (i = 0; i < pSessionDescription->sessionAttributesCount; i++) {
if (STRCMP(pSessionDescription->sdpAttributes[i].attributeName, "fingerprint") == 0) {
@@ -1034,6 +1036,9 @@ STATUS setRemoteDescription(PRtcPeerConnection pPeerConnection, PRtcSessionDescr
} else if (STRCMP(pSessionDescription->sdpAttributes[i].attributeName, "ice-options") == 0 &&
STRSTR(pSessionDescription->sdpAttributes[i].attributeValue, "trickle") != NULL) {
NULLABLE_SET_VALUE(pKvsPeerConnection->canTrickleIce, TRUE);
} else if (STRCMP(pSessionDescription->sdpAttributes[i].attributeName, "ice-lite") == 0) {
//if remote description says "ice-lite" we are always the ice controlling side
controlling = TRUE;
}
}

@@ -1086,7 +1091,7 @@ STATUS setRemoteDescription(PRtcPeerConnection pPeerConnection, PRtcSessionDescr
STRNCPY(pKvsPeerConnection->remoteIcePwd, remoteIcePwd, MAX_ICE_PWD_LEN);

CHK_STATUS(iceAgentStartAgent(pKvsPeerConnection->pIceAgent, pKvsPeerConnection->remoteIceUfrag, pKvsPeerConnection->remoteIcePwd,
pKvsPeerConnection->isOffer));
controlling));

if (!pKvsPeerConnection->isOffer) {
CHK_STATUS(setPayloadTypesFromOffer(pKvsPeerConnection->pCodecTable, pKvsPeerConnection->pRtxTable, pSessionDescription));