From a57d1beb176df76e29096547f4da2f97db9457a9 Mon Sep 17 00:00:00 2001 From: Hevake Date: Tue, 25 Jul 2023 21:52:12 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix(terminal):1.5.15,=E6=B6=88=E9=99=A4?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/terminal/impl/service/telnetd.cpp | 4 ++-- version.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/terminal/impl/service/telnetd.cpp b/modules/terminal/impl/service/telnetd.cpp index a356e0f5..07e8f178 100644 --- a/modules/terminal/impl/service/telnetd.cpp +++ b/modules/terminal/impl/service/telnetd.cpp @@ -172,7 +172,7 @@ void Telnetd::Impl::sendNego(const TcpServer::ConnToken &ct, Cmd cmd, Opt o) void Telnetd::Impl::sendCmd(const TcpServer::ConnToken &ct, Cmd cmd) { - const uint8_t tmp[] = { Cmd::kIAC, cmd}; + const uint8_t tmp[] = { Cmd::kIAC, cmd }; send(ct, tmp, sizeof(tmp)); } @@ -182,7 +182,7 @@ void Telnetd::Impl::sendSub(const TcpServer::ConnToken &ct, Opt o, const uint8_t uint8_t tmp[size]; tmp[0] = Cmd::kIAC; tmp[1] = Cmd::kSB; - tmp[2] = 0; + tmp[2] = o; memcpy(tmp + 3, p, s); tmp[size-2] = Cmd::kIAC; tmp[size-1] = Cmd::kSE; diff --git a/version.mk b/version.mk index 5a4d4cd1..46c2fcc0 100644 --- a/version.mk +++ b/version.mk @@ -1,4 +1,4 @@ # TBOX版本号 TBOX_VERSION_MAJOR := 1 TBOX_VERSION_MINOR := 5 -TBOX_VERSION_REVISION := 14 +TBOX_VERSION_REVISION := 15 From 35ee5955576fb284e801a75e6ed9175e64d92d7f Mon Sep 17 00:00:00 2001 From: Hevake Date: Wed, 26 Jul 2023 03:14:29 +0800 Subject: [PATCH 2/7] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9config.mk=EF=BC=8C?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=BC=80=E6=94=BE=E6=89=80=E6=9C=89=E7=9A=84?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=EF=BC=9B=202.=E4=BF=AE=E6=94=B9workflow/buil?= =?UTF-8?q?d.yml=EF=BC=8C=E4=BF=AE=E6=AD=A3=E6=9E=84=E5=BB=BA=E5=91=BD?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- config.mk | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60df266e..6e92fd78 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,4 +17,4 @@ jobs: sudo apt install libgtest-dev libgmock-dev libmosquitto-dev - uses: actions/checkout@v2 - name: build - run: make 3rd-party modules RELEASE=1 STAGING_DIR=$HOME/.tbox + run: make diff --git a/config.mk b/config.mk index c58007bc..23c4617e 100644 --- a/config.mk +++ b/config.mk @@ -10,12 +10,12 @@ MODULES += main MODULES += run ## 非核心模块,请根据需要选择 -#MODULES += coroutine -#MODULES += http -#MODULES += mqtt -#MODULES += flow -#MODULES += alarm -#MODULES += crypto +MODULES += coroutine +MODULES += http +MODULES += mqtt +MODULES += flow +MODULES += alarm +MODULES += crypto ## 第三方库依赖 THIRDPARTY += nlohmann From 1070be889b5d420b0220d2833ccb9fc43182842f Mon Sep 17 00:00:00 2001 From: Hevake Date: Wed, 26 Jul 2023 03:27:09 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0CONTRIBUTORS.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e497ce8b..3224cb65 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -4,3 +4,4 @@ _If we have forgotten your name, please contact us_ * Hevake Lee * Lucas Law + * Gwill From c56e036b55fa452d57ec8c61dd8292ff39230546 Mon Sep 17 00:00:00 2001 From: G_will Date: Wed, 26 Jul 2023 10:55:54 +0800 Subject: [PATCH 4/7] update actions --- .github/workflows/cmake.yml | 20 ++++++++++++++++++++ .github/workflows/{build.yml => make.yml} | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/cmake.yml rename .github/workflows/{build.yml => make.yml} (87%) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 00000000..0c5127ee --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,20 @@ +name: CMake Build + +on: + push: + branches: [ master, develop ] + pull_request: + branches: [ master, develop ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: setup + run: | + sudo apt update + sudo apt install build-essential cmake + sudo apt install libgtest-dev libgmock-dev libmosquitto-dev + - uses: actions/checkout@v3 + - name: build + run: cmake -B build -DCMAKE_INSTALL_PREFIX=$HOME/.tbox && cmake --build build diff --git a/.github/workflows/build.yml b/.github/workflows/make.yml similarity index 87% rename from .github/workflows/build.yml rename to .github/workflows/make.yml index 6e92fd78..cb62f71f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/make.yml @@ -1,4 +1,4 @@ -name: Build +name: Make Build on: push: @@ -15,6 +15,6 @@ jobs: sudo apt update sudo apt install build-essential sudo apt install libgtest-dev libgmock-dev libmosquitto-dev - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: build run: make From a2ce461a387b1087fc7b56702a147b759d74cce1 Mon Sep 17 00:00:00 2001 From: G_will Date: Wed, 26 Jul 2023 11:52:50 +0800 Subject: [PATCH 5/7] update github actions --- .github/workflows/cmake.yml | 6 ++++-- .github/workflows/make.yml | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 0c5127ee..e6eb0715 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -1,4 +1,4 @@ -name: CMake Build +name: CMake Build and Test on: push: @@ -17,4 +17,6 @@ jobs: sudo apt install libgtest-dev libgmock-dev libmosquitto-dev - uses: actions/checkout@v3 - name: build - run: cmake -B build -DCMAKE_INSTALL_PREFIX=$HOME/.tbox && cmake --build build + run: cmake -B build && cmake --build build + - name: test + run: find ./build -name *_test -exec {} \; diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index cb62f71f..b006d6aa 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -1,4 +1,4 @@ -name: Make Build +name: Make Build and Test on: push: @@ -18,3 +18,5 @@ jobs: - uses: actions/checkout@v3 - name: build run: make + - name: test + run: find .build -name test -exec {} \; From 10d4dab0c74f7ad92dddea69da7f4026cb3b267b Mon Sep 17 00:00:00 2001 From: G_will Date: Wed, 26 Jul 2023 15:13:59 +0800 Subject: [PATCH 6/7] update CMakeLists --- CMakeLists.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 109fe2a4..4bcf2ac5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,12 +78,12 @@ option(TBOX_ENABLE_NETWORK "build network" ON) option(TBOX_ENABLE_TERMINAL "build terminal" ON) option(TBOX_ENABLE_MAIN "build main" ON) -option(TBOX_ENABLE_COROUTINE "build coroutine" OFF) -option(TBOX_ENABLE_HTTP "build http" OFF) -option(TBOX_ENABLE_MQTT "build mqtt" OFF) -option(TBOX_ENABLE_FLOW "build flow" OFF) -option(TBOX_ENABLE_ALARM "build alarm" OFF) -option(TBOX_ENABLE_CRYPTO "build crypto" OFF) +option(TBOX_ENABLE_COROUTINE "build coroutine" ON) +option(TBOX_ENABLE_HTTP "build http" ON) +option(TBOX_ENABLE_MQTT "build mqtt" ON) +option(TBOX_ENABLE_FLOW "build flow" ON) +option(TBOX_ENABLE_ALARM "build alarm" ON) +option(TBOX_ENABLE_CRYPTO "build crypto" ON) # # 3rd-party libraries @@ -226,4 +226,3 @@ install( "${CMAKE_CURRENT_BINARY_DIR}/tboxConfigVersion.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/tbox ) - From 65007d54dd558f7b0e47074795ea5fc453080055 Mon Sep 17 00:00:00 2001 From: G_will Date: Wed, 26 Jul 2023 15:19:56 +0800 Subject: [PATCH 7/7] update action step names --- .github/workflows/cmake.yml | 6 +++--- .github/workflows/make.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e6eb0715..90f0a481 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -10,13 +10,13 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: setup + - name: Setup run: | sudo apt update sudo apt install build-essential cmake sudo apt install libgtest-dev libgmock-dev libmosquitto-dev - uses: actions/checkout@v3 - - name: build + - name: Build run: cmake -B build && cmake --build build - - name: test + - name: Test run: find ./build -name *_test -exec {} \; diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index b006d6aa..f25b7e61 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -10,13 +10,13 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: setup + - name: Setup run: | sudo apt update sudo apt install build-essential sudo apt install libgtest-dev libgmock-dev libmosquitto-dev - uses: actions/checkout@v3 - - name: build + - name: Build run: make - - name: test + - name: Test run: find .build -name test -exec {} \;