diff --git a/.gitignore b/.gitignore index e003da9..3e42f70 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .qtc_clangd -build \ No newline at end of file +build +dist \ No newline at end of file diff --git a/build-docker.sh b/build-docker.sh new file mode 100755 index 0000000..8192cad --- /dev/null +++ b/build-docker.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker run --rm -v `pwd`:/apps -w /apps danger89/cmake:latest ./build.sh \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..509f599 --- /dev/null +++ b/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cmake -S . -B build +cd build +cmake --build . \ No newline at end of file diff --git a/pack.sh b/pack.sh new file mode 100755 index 0000000..45b85e3 --- /dev/null +++ b/pack.sh @@ -0,0 +1,6 @@ +#!/bin/bash +mkdir -p dist +cp build/hkstreamer dist/ +cp -r lib dist/ +cd dist +tar -cvzf hkstreamer.tar.gz . \ No newline at end of file diff --git a/src/HkStreamer.cpp b/src/HkStreamer.cpp index 871ff8c..d073ae1 100644 --- a/src/HkStreamer.cpp +++ b/src/HkStreamer.cpp @@ -139,7 +139,7 @@ int _readChannelConfig(long lUserID,LPStream stream){ if(checkResult(!resCode, "read channel config fail")){ return HPR_ERROR; } - int startNum = ipcfg.dwStartDChan; + if(checkResult(stream->lChannel > ipcfg.dwDChanNum, "channel not correct")){ return HPR_ERROR; }