Commit Graph

185 Commits

Author SHA1 Message Date
8d74d34f2a rename Node.networks -> Node.networkConfigs 2023-03-02 07:19:49 -06:00
0aa4a4ba7a error handling, error reporting, asserts, logging 2023-03-02 07:19:49 -06:00
fbd834716f comments and logging 2023-03-02 07:19:49 -06:00
914b4fae7b switch statement work 2023-03-02 07:19:49 -06:00
a1bf139188 use PRId64 macros 2023-03-02 07:19:49 -06:00
a2f753986b JniRef work
JniRef does not use callbacks struct, so remove
fix NewGlobalRef / DeleteGlobalRef mismatch
2023-03-02 07:19:49 -06:00
d28f44335a use GETENV macro 2023-03-02 07:19:49 -06:00
0a925a6f21 fix ANDROID-38: stack corruption in onSendPacketRequested 2023-03-02 07:19:49 -06:00
132bff25df newInetAddress and newInetSocketAddress work
allow newInetSocketAddress to return NULL if given empty address
2023-03-02 07:19:49 -06:00
e1c16a8e68 invert logic in a couple of places and return early 2023-03-02 07:19:49 -06:00
4ee73fa272 add fromSocketAddressObject 2023-03-02 07:19:49 -06:00
30cfe65b39 add addressPort 2023-03-02 07:19:49 -06:00
40d5f9b5d2 add isSocketAddressEmpty 2023-03-02 07:19:49 -06:00
809022b273 make VirtualNetworkRoute a plain data class 2023-03-02 07:19:49 -06:00
f9a27d6778 make VirtualNetworkDNS a plain data class 2023-03-02 07:19:49 -06:00
b8b8e58586 remove unused VirtualNetworkConfig.enabled 2023-03-02 07:19:49 -06:00
54fd7c7e9a make VirtualNetworkConfig a plain data class 2023-03-02 07:19:49 -06:00
6102c70855 make Version a plain data class 2023-03-02 07:19:49 -06:00
6cc055dbba make Peer a plain data class 2023-03-02 07:19:49 -06:00
f51ce077a3 add array functions 2023-03-02 07:19:49 -06:00
2de4c95446 remove unused PeerPhysicalPath.fixed 2023-03-02 07:19:49 -06:00
63f70ba465 make PeerPhysicalPath a plain data class 2023-03-02 07:19:49 -06:00
90bf300bd8 Node init work: separate Node construction and init 2023-03-02 07:19:49 -06:00
f9528f1248 fix ANDROID-52: synchronization bug with nodeMap 2023-03-02 07:19:49 -06:00
4861ec5a40 make NodeStatus a plain data class 2023-03-02 07:19:49 -06:00
acf5b3579b add VirtualNetworkType.fromInt 2023-03-02 07:19:49 -06:00
85bd773c55 add VirtualNetworkStatus.fromInt 2023-03-02 07:19:49 -06:00
7c2766096c add VirtualNetworkConfigOperation.fromInt 2023-03-02 07:19:49 -06:00
34ff813e2a add ResultCode.fromInt 2023-03-02 07:19:49 -06:00
056cef7292 add PeerRole.fromInt 2023-03-02 07:19:49 -06:00
7c5f256d4a add Event.fromInt 2023-03-02 07:19:49 -06:00
82749e4442 ANDROID-48: use ZT_jnicache.cpp and remove ZT_jnilookup.cpp and ZT_jniarray.cpp 2023-03-02 07:19:49 -06:00
7890185e81 ANDROID-48: add ZT_jnicache.cpp 2023-03-02 07:19:49 -06:00
71fc0dd097 add LOG_TAG defines 2023-03-02 07:19:49 -06:00
8373a0fa60 add GETENV macro 2023-03-02 07:19:49 -06:00
21264baaae update to use unique error codes 2023-03-02 07:19:49 -06:00
703f9290c9 fix missing DeleteLocalRef in loops 2023-03-02 07:19:49 -06:00
dd1b52c7d9 fix ANDROID-35: memory leak 2023-03-02 07:19:49 -06:00
01003617cd fix ANDROID-51: fieldName is uninitialized 2023-03-02 07:19:49 -06:00
1c88037ea0 fix typos in JNI method signatures 2023-03-02 07:19:49 -06:00
0027e6bdab fix typo in log message 2023-03-02 07:19:49 -06:00
87edbb2d3a fix ANDROID-50: RESULT_ERROR_BAD_PARAMETER typo 2023-03-02 07:19:49 -06:00
5be92a96df cleanup 2023-03-02 07:19:49 -06:00
0733af5239 move extern "C"
only JNI functions need to be exported
2023-03-02 07:19:49 -06:00
216ed8c8ea fix headers
use recommended headers and remove unused headers
2023-03-02 07:19:49 -06:00
d31f238be0 fix typos (#1843) 2023-01-11 19:42:30 +01:00
77c7f9133f Migrate from ndk-build to CMake 2022-12-05 10:34:12 -05:00
475281935e Remove unused flags for arm64-v8a
Through using ndk-build, -Wno-unused-command-line-argument is passed in
somewhere in the pipeline and hides this warning.

The warning can be turned on with:
APP_CPPFLAGS := -Wunused-command-line-argument ...

and then when building, you can see:
C/C++: clang++: warning: argument unused during compilation: '-mfloat-abi=softfp' [-Wunused-command-line-argument]
C/C++: clang++: warning: argument unused during compilation: '-mfpu=neon' [-Wunused-command-line-argument]
C/C++: clang++: warning: argument unused during compilation: '-maes' [-Wunused-command-line-argument]

These are unused because both floating-point and NEON are required in
all standard ARMv8 implementations. [1] [2]

[1] https://developer.arm.com/documentation/den0024/a/AArch64-Floating-point-and-NEON

[2] https://stackoverflow.com/a/29891469
2022-12-05 10:34:12 -05:00
cdf248b1e2 Fix build problem related to unified headers
Since NDKr15 (released 2017), unified headers are used by default [1]

Remove -isystem option that was passing bad values to command-line.

The actual value being passed to command-line was:
```
-isystem DK/sysroot/usr/include/RIPLE
```

because of using $NDK and $TRIPLE instead of $(NDK) and $(TRIPLE)

But regardless, $NDK and $TRIPLE were never actually defined values and were just
place-holders mentioned in [1]

[1] https://android.googlesource.com/platform/ndk/+/ndk-release-r16/docs/UnifiedHeaders.md
2022-12-05 10:34:12 -05:00
9ac2cfe611 Fix warning: suggest braces around initialization of subobject 2022-12-01 08:35:31 -05:00