From 75e7c83641445e6e6b0643307c511ce51a6f7ad6 Mon Sep 17 00:00:00 2001 From: Denys Makogon Date: Tue, 18 Jun 2024 18:50:51 +0200 Subject: [PATCH 1/2] updating formatting --- include/api.h | 11 ++++++++--- include/server.h | 10 +++++++--- jitpack.yml | 2 +- src/c_api.cc | 6 ++++-- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/include/api.h b/include/api.h index a3f3242..06b908e 100644 --- a/include/api.h +++ b/include/api.h @@ -3,10 +3,15 @@ #ifdef __cplusplus extern "C" { #endif - int nativeServer(void (*handler)(char* /* data */, long /* bytesReceived*/, char* /* host */, int /* port */), int port, int bufferSize, int threadCount); + int nativeServer(void (*handler)(char* /* data */, long /* bytesReceived*/, + char* /* host */, int /* port */), + int port, int bufferSize, int threadCount); void boostServer(void (*handler)(struct udp_request* request), - void (*before_handler)(char* /* data */, char* /* errorCategory */, int /* errorCode */, long /* bytesReceived */, char* /* client */, int /* port */), - void (*after_handler)(char* /* data */, long /* bytesReceived*/, char* /* host */, int /* port */), + void (*before_handler)(char* /* data */, char* /* errorCategory */, + int /* errorCode */, long /* bytesReceived */, + char* /* client */, int /* port */), + void (*after_handler)(char* /* data */, long /* bytesReceived*/, + char* /* host */, int /* port */), int port, int bufferSize, int threadCount); #ifdef __cplusplus } diff --git a/include/server.h b/include/server.h index b2b170f..b0bf0c5 100644 --- a/include/server.h +++ b/include/server.h @@ -3,9 +3,13 @@ #include "structs.h" -int startNativeServer(void (*handler)(char*, long, char*, int), int port, int bufferSize, int threadCount); +int startNativeServer(void (*handler)(char*, long, char*, int), + int port, int bufferSize, int threadCount); void startBoostServer(void (*handler)(struct udp_request* request), - void (*before_handler)(char* /* data */, char* /* errorCategory */, int /* errorCode */, long /* bytesReceived */, char* /* client */, int /* port */), - void (*after_handler)(char* /* data */, long /* bytesReceived*/, char* /* host */, int /* port */), + void (*before_handler)(char* /* data */, char* /* errorCategory */, + int /* errorCode */, long /* bytesReceived */, + char* /* client */, int /* port */), + void (*after_handler)(char* /* data */, long /* bytesReceived*/, + char* /* host */, int /* port */), int port, int bufferSize, int threadCount); #endif /* server_h */ diff --git a/jitpack.yml b/jitpack.yml index 15bbf65..e1682d2 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,5 +1,5 @@ before_install: - - sdk install java 22-open + - sdk install java 23.ea.27-open install: - PROJECT=judy - version=$(date +'%Y.%m.%d+%s') diff --git a/src/c_api.cc b/src/c_api.cc index 71300e9..fa948ad 100644 --- a/src/c_api.cc +++ b/src/c_api.cc @@ -6,8 +6,10 @@ extern "C" int nativeServer(void (*handler)(char*, long, char*, int), int port, } extern "C" void boostServer(void (*handler)(struct udp_request* request), - void (*before_handler)(char* /* data */, char* /* errorCategory */, int /* errorCode */, long /* bytesReceived */, char* /* client */, int /* port */), - void (*after_handler)(char* /* data */, long /* bytesReceived*/, char* /* host */, int /* port */), + void (*before_handler)(char* /* data */, char* /* errorCategory */, int /* errorCode */, + long /* bytesReceived */, char* /* client */, int /* port */), + void (*after_handler)(char* /* data */, long /* bytesReceived*/, char* /* host */, + int /* port */), int port, int bufferSize, int threadCount) { startBoostServer(handler, before_handler, after_handler, port, bufferSize, threadCount); } From 7698a2cb0544d32699fdc1c410ea82fc84f6cd86 Mon Sep 17 00:00:00 2001 From: Denys Makogon Date: Tue, 18 Jun 2024 19:01:30 +0200 Subject: [PATCH 2/2] use jdk22 --- .github/workflows/build.yml | 2 +- jitpack.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c2577d5..641b554 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -189,7 +189,7 @@ jobs: - name: version id: version shell: bash - run: echo "version_var=$(date +'%Y.%m.%d+%s')" >> $GITHUB_ENV + run: echo "version_var=$(date +'%Y.%m.%d')" >> $GITHUB_ENV - name: Set up Homebrew id: set-up-homebrew diff --git a/jitpack.yml b/jitpack.yml index e1682d2..e4b198a 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,8 +1,8 @@ before_install: - - sdk install java 23.ea.27-open + - sdk install java 22-open install: - PROJECT=judy -- version=$(date +'%Y.%m.%d+%s') +- version=$(date +'%Y.%m.%d') - JAR_NAME="$PROJECT.latest.jar" - FILE="jars/$JAR_NAME" - mkdir jars/