Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed Jun 3, 2024
1 parent 9594606 commit 6966dde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ SET ( DEFAULT_PROTOBUF ON )
SET ( DEFAULT_BOBLIGHT OFF )
SET ( DEFAULT_WS281XPWM OFF )
SET ( DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS OFF )
SET ( DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF )
SET ( DEFAULT_USE_SYSTEM_MQTT_LIBS OFF )
SET ( DEFAULT_MF OFF )
SET ( DEFAULT_DX OFF )
Expand Down Expand Up @@ -450,9 +449,6 @@ colorMe("USE_SYSTEM_MQTT_LIBS = " ${USE_SYSTEM_MQTT_LIBS})
option(USE_SYSTEM_FLATBUFFERS_LIBS "Use system flatbuffers libs" ${DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS})
colorMe("USE_SYSTEM_FLATBUFFERS_LIBS = " ${USE_SYSTEM_FLATBUFFERS_LIBS})

option(USE_SYSTEM_MBEDTLS_LIBS "Use system mbedtls libs" ${DEFAULT_USE_SYSTEM_MBEDTLS_LIBS})
colorMe("USE_SYSTEM_MBEDTLS_LIBS = " ${USE_SYSTEM_MBEDTLS_LIBS})

if(UNIX AND NOT APPLE)
option(USE_STANDARD_INSTALLER_NAME "Use the standardized Linux installer name" OFF)
colorMe("USE_STANDARD_INSTALLER_NAME = " ${USE_STANDARD_INSTALLER_NAME})
Expand Down Expand Up @@ -636,8 +632,8 @@ add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_D
include (${CMAKE_CURRENT_SOURCE_DIR}/cmake/packages.cmake)

# external targets
if (WIN32 AND TARGET apidoc AND TARGET flatbuffers AND TARGET flatc AND TARGET mbedcrypto AND TARGET qmqtt AND TARGET liblzma AND TARGET sqlite3)
set_target_properties(qmqtt apidoc flatbuffers flatc lib mbedcrypto mbedtls mbedx509 resources uninstall liblzma sqlite3 PROPERTIES FOLDER ExternalLibsTargets)
if (WIN32 AND TARGET apidoc AND TARGET flatbuffers AND TARGET flatc AND TARGET qmqtt AND TARGET liblzma AND TARGET sqlite3)
set_target_properties(qmqtt apidoc flatbuffers flatc lib resources uninstall liblzma sqlite3 PROPERTIES FOLDER ExternalLibsTargets)
else()
set_target_properties(resources uninstall PROPERTIES FOLDER ExternalLibsTargets)
endif()
Expand Down
4 changes: 2 additions & 2 deletions sources/leddevice/dev_net/ProviderUdpSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ void ProviderUdpSSL::writeBytes(unsigned int size, const uint8_t* data, bool flu
if (_dtls != nullptr && _socket != nullptr && (_streamReady || _dtls->isConnectionEncrypted()))
{
_streamReady = true;
QByteArray dgram(size, Qt::Uninitialized);
memcpy(dgram.data(), data, size);

QByteArray dgram = QByteArray::fromRawData(reinterpret_cast<const char*>(data), size);
if (_dtls->writeDatagramEncrypted(_socket, dgram) < 0)
{
errorHandling(_dtls->dtlsErrorString());
Expand Down

0 comments on commit 6966dde

Please sign in to comment.