mirror of https://github.com/oxen-io/lokinet
bump ngtcp2 to v0.1.0 tag
This commit is contained in:
parent
3c983e2cd7
commit
95efe8f4e5
|
@ -35,3 +35,4 @@
|
|||
[submodule "external/ngtcp2"]
|
||||
path = external/ngtcp2
|
||||
url = https://github.com/ngtcp2/ngtcp2.git
|
||||
branch = v0.1.0
|
|
@ -45,8 +45,9 @@ function(add_ngtcp2_lib)
|
|||
|
||||
configure_file(ngtcp2/cmakeconfig.h.in ngtcp2/config.h)
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}/ngtcp2") # for config.h
|
||||
|
||||
set(ENABLE_STATIC_LIB ON FORCE BOOL)
|
||||
set(ENABLE_SHARED_LIB OFF FORCE BOOL)
|
||||
add_subdirectory(ngtcp2/lib EXCLUDE_FROM_ALL)
|
||||
|
||||
target_compile_definitions(ngtcp2 PRIVATE -DHAVE_CONFIG_H -D_GNU_SOURCE)
|
||||
target_compile_definitions(ngtcp2_static PRIVATE -DHAVE_CONFIG_H -D_GNU_SOURCE)
|
||||
endfunction()
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 15ba6021ca352e2e60f9b43f4b96d2e97a42f60b
|
||||
Subproject commit 026b8434ebcbeec48939d1c7671a0a4d5c75202b
|
|
@ -241,7 +241,7 @@ if(WITH_HIVE)
|
|||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(liblokinet PUBLIC cxxopts lokinet-platform lokinet-util lokinet-cryptography sqlite_orm ngtcp2)
|
||||
target_link_libraries(liblokinet PUBLIC cxxopts lokinet-platform lokinet-util lokinet-cryptography sqlite_orm ngtcp2_static)
|
||||
target_link_libraries(liblokinet PRIVATE libunbound)
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace llarp::quic
|
|||
class Address
|
||||
{
|
||||
sockaddr_in6 saddr{};
|
||||
ngtcp2_addr a{sizeof(saddr), reinterpret_cast<sockaddr*>(&saddr)};
|
||||
ngtcp2_addr a{reinterpret_cast<sockaddr*>(&saddr), sizeof(saddr)};
|
||||
|
||||
public:
|
||||
Address() = default;
|
||||
|
@ -102,7 +102,7 @@ namespace llarp::quic
|
|||
Address local_, remote_;
|
||||
|
||||
public:
|
||||
ngtcp2_path path{{local_.sockaddr_size(), local_}, {remote_.sockaddr_size(), remote_}, nullptr};
|
||||
ngtcp2_path path{{local_, local_.sockaddr_size()}, {remote_, remote_.sockaddr_size()}, nullptr};
|
||||
|
||||
// Public accessors are const:
|
||||
const Address& local = local_;
|
||||
|
|
|
@ -245,6 +245,8 @@ namespace llarp::quic
|
|||
u8data(conn.conn_buffer),
|
||||
conn.conn_buffer.size(),
|
||||
code,
|
||||
nullptr, // reason
|
||||
0, // reason length
|
||||
get_timestamp());
|
||||
if (written <= 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue