Skip to content

Commit

Permalink
Merge 1b66e41 into 913f469
Browse files Browse the repository at this point in the history
  • Loading branch information
disa6302 authored Aug 24, 2023
2 parents 913f469 + 1b66e41 commit 1f18d9c
Show file tree
Hide file tree
Showing 12 changed files with 188 additions and 133 deletions.
108 changes: 103 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,17 @@ jobs:
AWS_KVS_LOG_LEVEL: 2
LDFLAGS: -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
CPATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build repository
run: |
mkdir build && cd build
Expand All @@ -48,9 +56,17 @@ jobs:
CC: gcc
CXX: g++
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build repository
run: |
mkdir build && cd build
Expand All @@ -66,9 +82,17 @@ jobs:
AWS_KVS_LOG_LEVEL: 2
LDFLAGS: -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
CPATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build repository
run: |
mkdir build && cd build
Expand All @@ -82,9 +106,17 @@ jobs:
runs-on: ubuntu-20.04
env:
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build repository
run: |
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
Expand All @@ -108,9 +140,17 @@ jobs:
CC: clang
CXX: clang++
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install dependencies
run: |
sudo apt clean && sudo apt update
Expand All @@ -134,9 +174,17 @@ jobs:
CC: clang
CXX: clang++
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install dependencies
run: |
sudo apt clean && sudo apt update
Expand Down Expand Up @@ -177,13 +225,21 @@ jobs:
thread-sanitizer:
runs-on: ubuntu-20.04
env:
TSAN_OPTIONS: halt_on_error=1:suppressions=../tst/suppressions/TSAN.supp
TSAN_OPTIONS: second_deadlock_stack=1:halt_on_error=1:suppressions=../tst/suppressions/TSAN.supp
CC: clang
CXX: clang++
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install dependencies
run: |
sudo apt clean && sudo apt update
Expand All @@ -204,9 +260,17 @@ jobs:
env:
AWS_KVS_LOG_LEVEL: 2
CC: gcc-4.4
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install deps
run: |
sudo apt clean && sudo apt update
Expand Down Expand Up @@ -235,6 +299,9 @@ jobs:
CC: gcc
CXX: g++
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
Expand All @@ -252,9 +319,17 @@ jobs:
runs-on: ubuntu-20.04
env:
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install deps
run: |
sudo apt clean && sudo apt update
Expand All @@ -281,9 +356,17 @@ jobs:
CC: clang
CXX: clang++
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install dependencies
run: |
sudo apt clean && sudo apt update
Expand Down Expand Up @@ -311,10 +394,9 @@ jobs:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build repository
run: |
Expand All @@ -328,9 +410,17 @@ jobs:
runs-on: ubuntu-20.04
env:
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build repository
run: |
# TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
Expand All @@ -346,9 +436,17 @@ jobs:
runs-on: windows-2022
env:
AWS_KVS_LOG_LEVEL: 1
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Move cloned repo
shell: powershell
run: |
Expand All @@ -358,7 +456,7 @@ jobs:
shell: powershell
run: |
choco install gstreamer --version=1.16.2
choco install gstreamer-devel --version=1.16.2
choco install gstreamer-devel --version=1.16.2
curl.exe -o C:\tools\pthreads-w32-2-9-1-release.zip ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip
mkdir C:\tools\pthreads-w32-2-9-1-release\
Expand-Archive -Path C:\tools\pthreads-w32-2-9-1-release.zip -DestinationPath C:\tools\pthreads-w32-2-9-1-release
Expand Down Expand Up @@ -467,4 +565,4 @@ jobs:
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
mkdir build && cd build
cmake .. -DBUILD_OPENSSL=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic32 -DBUILD_LIBSRTP_HOST_PLATFORM=x86_64-unknown-linux-gnu -DBUILD_LIBSRTP_DESTINATION_PLATFORM=arm-unknown-linux-uclibcgnueabi
make
make
8 changes: 8 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ on:
jobs:
linux-gcc-codecov:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Fetch
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Run code coverage
run: |
mkdir build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-desc-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ jobs:
error_occurred=0
# Define minimum character count for each section
MIN_CHARS=25
# Extract contents
# Extract contents
what_changed=$(echo "$pr_description" | sed -n -e '/\*What was changed?\*/,/\*/p' | sed '$d' | sed '1d')
why_changed=$(echo "$pr_description" | sed -n -e '/\*Why was it changed?\*/,/\*/p' | sed '$d' | sed '1d')
how_changed=$(echo "$pr_description" | sed -n -e '/\*How was it changed?\*/,/\*/p' | sed '$d' | sed '1d')
testing_done=$(echo "$pr_description" | sed -n -e '/\*What testing was done for the changes?\*/,/\*/p' | sed '$d' | sed '1d')
if [[ ${#what_changed} -lt $MIN_CHARS ]]; then
echo "PR description for what changed section is either missing or too short."
error_occurred=1
Expand Down
2 changes: 1 addition & 1 deletion CMake/Dependencies/libkvsCommonLws-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include(ExternalProject)

ExternalProject_Add(libkvsCommonLws-download
GIT_REPOSITORY https://github.com/awslabs/amazon-kinesis-video-streams-producer-c.git
GIT_TAG daf742a0a53f72341e5b2df75a05ebe6d2557811
GIT_TAG ab3b6331594dfbd0a59686dfb8dc4938bc86da1a
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,11 +631,17 @@ extern "C" {
*/
#define SIGNALING_CONNECT_TIMEOUT (5 * HUNDREDS_OF_NANOS_IN_A_SECOND)

#ifdef _WIN32
/**
* Default timeout for sending data
*/
#define SIGNALING_SEND_TIMEOUT (15 * HUNDREDS_OF_NANOS_IN_A_SECOND)
#else
/**
* Default timeout for sending data
*/
#define SIGNALING_SEND_TIMEOUT (5 * HUNDREDS_OF_NANOS_IN_A_SECOND)

#endif
/**
* Default timeout for deleting a channel
*/
Expand Down
5 changes: 5 additions & 0 deletions src/source/Ice/SocketConnection.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ STATUS freeSocketConnection(PSocketConnection* ppSocketConnection)
CHK(ppSocketConnection != NULL, STATUS_NULL_ARG);
pSocketConnection = *ppSocketConnection;
CHK(pSocketConnection != NULL, retStatus);

// connectionClosed is accessed and modified when checking if socket connection is closed
// Hence the modification needs to be protected
MUTEX_LOCK(pSocketConnection->lock);
ATOMIC_STORE_BOOL(&pSocketConnection->connectionClosed, TRUE);
MUTEX_UNLOCK(pSocketConnection->lock);

// Await for the socket connection to be released
shutdownTimeout = GETTIME() + KVS_ICE_TURN_CONNECTION_SHUTDOWN_TIMEOUT;
Expand Down
6 changes: 4 additions & 2 deletions src/source/Ice/TurnConnection.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ STATUS freeTurnConnection(PTurnConnection* ppTurnConnection)

pTurnConnection = *ppTurnConnection;

// Ensure we are not freeing everything without cancelling the timer
timerCallbackId = ATOMIC_EXCHANGE(&pTurnConnection->timerCallbackId, MAX_UINT32);
if (timerCallbackId != MAX_UINT32) {
CHK_LOG_ERR(timerQueueCancelTimer(pTurnConnection->timerQueueHandle, (UINT32) timerCallbackId, (UINT64) pTurnConnection));
}

// shutdown control channel
if (pTurnConnection->pControlChannel) {
CHK_LOG_ERR(connectionListenerRemoveConnection(pTurnConnection->pConnectionListener, pTurnConnection->pControlChannel));
Expand Down Expand Up @@ -1076,7 +1076,9 @@ STATUS turnConnectionStepState(PTurnConnection pTurnConnection)
}

CHK_STATUS(turnConnectionFreePreAllocatedPackets(pTurnConnection));
CHK_STATUS(socketConnectionClosed(pTurnConnection->pControlChannel));
if (pTurnConnection != NULL) {
CHK_STATUS(socketConnectionClosed(pTurnConnection->pControlChannel));
}
pTurnConnection->state = STATUS_SUCCEEDED(pTurnConnection->errorStatus) ? TURN_STATE_NEW : TURN_STATE_FAILED;
ATOMIC_STORE_BOOL(&pTurnConnection->shutdownComplete, TRUE);
}
Expand Down
4 changes: 1 addition & 3 deletions tst/IceFunctionalityTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,7 @@ TEST_F(IceFunctionalityTest, IceAgentPruneUnconnectedIceCandidatePairUnitTest)

TEST_F(IceFunctionalityTest, IceAgentCandidateGatheringTest)
{
if (!mAccessKeyIdSet) {
return;
}
ASSERT_EQ(TRUE, mAccessKeyIdSet);

typedef struct {
std::vector<std::string> list;
Expand Down
Loading

0 comments on commit 1f18d9c

Please sign in to comment.