Skip to content

Commit 2ce1f4d

Browse files
committed
CLANG format
1 parent 3a780ac commit 2ce1f4d

File tree

6 files changed

+24
-25
lines changed

6 files changed

+24
-25
lines changed

src/source/Crypto/Tls_openssl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ STATUS tlsSessionPutApplicationData(PTlsSession pTlsSession, PBYTE pData, UINT32
216216
wBioGetMemDataRet = BIO_get_mem_data(SSL_get_wbio(pTlsSession->pSsl), &wBioBuffer);
217217
CHK_ERR(wBioGetMemDataRet != 0, STATUS_SEND_DATA_FAILED, "BIO_get_mem_data failed with: no BIO was connected to the SSL object.");
218218
CHK_ERR(wBioGetMemDataRet > 0, STATUS_SEND_DATA_FAILED, "BIO_get_mem_data failed");
219-
219+
220220
wBioDataLen = (SIZE_T) wBioGetMemDataRet;
221221

222222
if (wBioDataLen > 0) {

src/source/Ice/TurnConnection.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -1022,8 +1022,8 @@ STATUS checkTurnPeerConnections(PTurnConnection pTurnConnection)
10221022
CHK(pTurnPeer->pTransactionIdStore != NULL, STATUS_INVALID_OPERATION);
10231023
transactionIdStoreInsert(pTurnPeer->pTransactionIdStore, pTurnConnection->pTurnCreatePermissionPacket->header.transactionId);
10241024
iceUtilsSendStunPacket(pTurnConnection->pTurnCreatePermissionPacket, pTurnConnection->longTermKey,
1025-
ARRAY_SIZE(pTurnConnection->longTermKey), &pTurnConnection->turnServer.ipAddress,
1026-
pTurnConnection->pControlChannel, NULL, FALSE);
1025+
ARRAY_SIZE(pTurnConnection->longTermKey), &pTurnConnection->turnServer.ipAddress, pTurnConnection->pControlChannel,
1026+
NULL, FALSE);
10271027

10281028
} else if (pTurnPeer->connectionState == TURN_PEER_CONN_STATE_BIND_CHANNEL) {
10291029
// update peer address;
@@ -1043,9 +1043,8 @@ STATUS checkTurnPeerConnections(PTurnConnection pTurnConnection)
10431043

10441044
CHK(pTurnPeer->pTransactionIdStore != NULL, STATUS_INVALID_OPERATION);
10451045
transactionIdStoreInsert(pTurnPeer->pTransactionIdStore, pTurnConnection->pTurnChannelBindPacket->header.transactionId);
1046-
iceUtilsSendStunPacket(pTurnConnection->pTurnChannelBindPacket, pTurnConnection->longTermKey,
1047-
ARRAY_SIZE(pTurnConnection->longTermKey), &pTurnConnection->turnServer.ipAddress,
1048-
pTurnConnection->pControlChannel, NULL, FALSE);
1046+
iceUtilsSendStunPacket(pTurnConnection->pTurnChannelBindPacket, pTurnConnection->longTermKey, ARRAY_SIZE(pTurnConnection->longTermKey),
1047+
&pTurnConnection->turnServer.ipAddress, pTurnConnection->pControlChannel, NULL, FALSE);
10491048
}
10501049
}
10511050

src/source/PeerConnection/SessionDescription.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ STATUS populateSingleMediaSection(PKvsPeerConnection pKvsPeerConnection, PKvsRtp
437437
attributeNameBuffLen = SIZEOF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName);
438438
if (containRtx) {
439439
STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "msid");
440-
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%s %sRTX", pRtcMediaStreamTrack->streamId,
441-
pRtcMediaStreamTrack->trackId);
440+
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%s %sRTX",
441+
pRtcMediaStreamTrack->streamId, pRtcMediaStreamTrack->trackId);
442442
attributeNameBuffLen -= amountWritten;
443443
attributeCount++;
444444

@@ -448,8 +448,8 @@ STATUS populateSingleMediaSection(PKvsPeerConnection pKvsPeerConnection, PKvsRtp
448448
attributeCount++;
449449
} else {
450450
STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "msid");
451-
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%s %s", pRtcMediaStreamTrack->streamId,
452-
pRtcMediaStreamTrack->trackId);
451+
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%s %s",
452+
pRtcMediaStreamTrack->streamId, pRtcMediaStreamTrack->trackId);
453453
attributeCount++;
454454
}
455455

@@ -459,18 +459,18 @@ STATUS populateSingleMediaSection(PKvsPeerConnection pKvsPeerConnection, PKvsRtp
459459
attributeCount++;
460460

461461
STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "ssrc");
462-
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u msid:%s %s", pKvsRtpTransceiver->sender.ssrc,
463-
pRtcMediaStreamTrack->streamId, pRtcMediaStreamTrack->trackId);
462+
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u msid:%s %s",
463+
pKvsRtpTransceiver->sender.ssrc, pRtcMediaStreamTrack->streamId, pRtcMediaStreamTrack->trackId);
464464
attributeCount++;
465465

466466
STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "ssrc");
467-
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u mslabel:%s", pKvsRtpTransceiver->sender.ssrc,
468-
pRtcMediaStreamTrack->streamId);
467+
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u mslabel:%s",
468+
pKvsRtpTransceiver->sender.ssrc, pRtcMediaStreamTrack->streamId);
469469
attributeCount++;
470470

471471
STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "ssrc");
472-
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u label:%s", pKvsRtpTransceiver->sender.ssrc,
473-
pRtcMediaStreamTrack->trackId);
472+
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u label:%s",
473+
pKvsRtpTransceiver->sender.ssrc, pRtcMediaStreamTrack->trackId);
474474
attributeCount++;
475475

476476
if (containRtx) {
@@ -480,18 +480,18 @@ STATUS populateSingleMediaSection(PKvsPeerConnection pKvsPeerConnection, PKvsRtp
480480
attributeCount++;
481481

482482
STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "ssrc");
483-
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u msid:%s %sRTX", pKvsRtpTransceiver->sender.rtxSsrc,
484-
pRtcMediaStreamTrack->streamId, pRtcMediaStreamTrack->trackId);
483+
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u msid:%s %sRTX",
484+
pKvsRtpTransceiver->sender.rtxSsrc, pRtcMediaStreamTrack->streamId, pRtcMediaStreamTrack->trackId);
485485
attributeCount++;
486486

487487
STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "ssrc");
488-
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u mslabel:%sRTX", pKvsRtpTransceiver->sender.rtxSsrc,
489-
pRtcMediaStreamTrack->streamId);
488+
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u mslabel:%sRTX",
489+
pKvsRtpTransceiver->sender.rtxSsrc, pRtcMediaStreamTrack->streamId);
490490
attributeCount++;
491491

492492
STRCPY(pSdpMediaDescription->sdpAttributes[attributeCount].attributeName, "ssrc");
493-
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u label:%sRTX", pKvsRtpTransceiver->sender.rtxSsrc,
494-
pRtcMediaStreamTrack->trackId);
493+
amountWritten = SNPRINTF(pSdpMediaDescription->sdpAttributes[attributeCount].attributeValue, attributeNameBuffLen, "%u label:%sRTX",
494+
pKvsRtpTransceiver->sender.rtxSsrc, pRtcMediaStreamTrack->trackId);
495495
attributeCount++;
496496
}
497497

src/source/Rtcp/RtcpPacket.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ STATUS setRtcpPacketFromBytes(PBYTE pRawPacket, UINT32 pRawPacketsLen, PRtcpPack
1515
// We don't assert exact length since this may be a compound packet, it
1616
// is the callers responsibility to parse subsequent entries
1717
packetLen = getInt16(*(PUINT16) (pRawPacket + RTCP_PACKET_LEN_OFFSET));
18-
CHK((UINT16)((packetLen + 1) * RTCP_PACKET_LEN_WORD_SIZE) <= pRawPacketsLen, STATUS_RTCP_INPUT_PARTIAL_PACKET);
18+
CHK((UINT16) ((packetLen + 1) * RTCP_PACKET_LEN_WORD_SIZE) <= pRawPacketsLen, STATUS_RTCP_INPUT_PARTIAL_PACKET);
1919

2020
pRtcpPacket->header.version = (pRawPacket[0] >> VERSION_SHIFT) & VERSION_MASK;
2121
CHK(pRtcpPacket->header.version == RTCP_PACKET_VERSION_VAL, STATUS_RTCP_INPUT_PACKET_INVALID_VERSION);

src/source/Sctp/Sctp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ INT32 onSctpInboundPacket(struct socket* sock, union sctp_sockstore addr, PVOID
359359
CleanUp:
360360

361361
UNUSED_PARAM(retStatus);
362-
362+
363363
/*
364364
* IMPORTANT!!! The allocation is done in the sctp library using default allocator
365365
* so we need to use the default free API.

src/source/Stun/Stun.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ STATUS deserializeStunPacket(PBYTE pStunBuffer, UINT32 bufferSize, PBYTE passwor
555555
magicCookie = (UINT32) getInt32(*(PUINT32) ((PBYTE) pStunHeader + STUN_HEADER_TYPE_LEN + STUN_HEADER_DATA_LEN));
556556

557557
// Validate the specified size
558-
CHK(bufferSize >= (UINT16)(messageLength + STUN_HEADER_LEN), STATUS_INVALID_ARG);
558+
CHK(bufferSize >= (UINT16) (messageLength + STUN_HEADER_LEN), STATUS_INVALID_ARG);
559559

560560
// Validate the magic cookie
561561
CHK(magicCookie == STUN_HEADER_MAGIC_COOKIE, STATUS_STUN_MAGIC_COOKIE_MISMATCH);

0 commit comments

Comments
 (0)