From ce1fc547ee59153c2d913aeae6ca696decc96956 Mon Sep 17 00:00:00 2001 From: Hassan Sahibzada Date: Tue, 31 Oct 2023 09:10:38 -0700 Subject: [PATCH 1/3] Update SessionDescription.c Adds trickle ice option to application m-line (data channel). --- src/source/PeerConnection/SessionDescription.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/source/PeerConnection/SessionDescription.c b/src/source/PeerConnection/SessionDescription.c index 3ecda3406c..219e605294 100644 --- a/src/source/PeerConnection/SessionDescription.c +++ b/src/source/PeerConnection/SessionDescription.c @@ -679,6 +679,10 @@ STATUS populateSessionDescriptionDataChannel(PKvsPeerConnection pKvsPeerConnecti STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, pKvsPeerConnection->localIcePwd); attributeCount++; + STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "ice-options"); + STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, "trickle"); + attributeCount++; + STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "fingerprint"); STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, "sha-256 "); STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue + 8, pCertificateFingerprint); From e81a57649a79acf4b9d730e02249669901af553b Mon Sep 17 00:00:00 2001 From: Hassan Sahibzada Date: Tue, 31 Oct 2023 11:49:01 -0700 Subject: [PATCH 2/3] Update SessionDescription.c respect the boolean value for trickle ice so it's consistent across all media level and session level --- src/source/PeerConnection/SessionDescription.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/source/PeerConnection/SessionDescription.c b/src/source/PeerConnection/SessionDescription.c index 219e605294..a66d4f5b32 100644 --- a/src/source/PeerConnection/SessionDescription.c +++ b/src/source/PeerConnection/SessionDescription.c @@ -502,9 +502,11 @@ STATUS populateSingleMediaSection(PKvsPeerConnection pKvsPeerConnection, PKvsRtp STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, pKvsPeerConnection->localIcePwd); attributeCount++; - STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "ice-options"); - STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, "trickle"); - attributeCount++; + if (pKvsPeerConnection->canTrickleIce.value) { + STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "ice-options"); + STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, "trickle"); + attributeCount++; + } STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "fingerprint"); STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, "sha-256 "); @@ -679,9 +681,11 @@ STATUS populateSessionDescriptionDataChannel(PKvsPeerConnection pKvsPeerConnecti STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, pKvsPeerConnection->localIcePwd); attributeCount++; - STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "ice-options"); - STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, "trickle"); - attributeCount++; + if (pKvsPeerConnection->canTrickleIce.value) { + STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "ice-options"); + STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, "trickle"); + attributeCount++; + } STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "fingerprint"); STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, "sha-256 "); From 642b4d74b5cbce0044c548683200d617659f4363 Mon Sep 17 00:00:00 2001 From: Hassan Sahibzada Date: Wed, 1 Nov 2023 08:32:29 -0700 Subject: [PATCH 3/3] clang format --- src/source/PeerConnection/SessionDescription.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/source/PeerConnection/SessionDescription.c b/src/source/PeerConnection/SessionDescription.c index a66d4f5b32..ebb74c5f30 100644 --- a/src/source/PeerConnection/SessionDescription.c +++ b/src/source/PeerConnection/SessionDescription.c @@ -686,7 +686,7 @@ STATUS populateSessionDescriptionDataChannel(PKvsPeerConnection pKvsPeerConnecti STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, "trickle"); attributeCount++; } - + STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "fingerprint"); STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, "sha-256 "); STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue + 8, pCertificateFingerprint);