Skip to content

Commit 524723b

Browse files
committed
fix(mosq): Updated per code review
1 parent 0fd4a54 commit 524723b

File tree

4 files changed

+7
-29
lines changed

4 files changed

+7
-29
lines changed

components/mosquitto/examples/serverless_mqtt/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ if(script_result)
1616
message(FATAL_ERROR "Script esp_peer_setup.sh failed with exit code ${script_result}")
1717
endif()
1818
list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_BINARY_DIR}/esp-peer/components/")
19+
else()
20+
message(STATUS "ESP-PEER is not compatible with this target")
1921
endif()
2022

2123
project(serverless_mqtt)

components/mosquitto/examples/serverless_mqtt/esp_peer_setup/Add-default-event-to-http-client-handler.patch

Lines changed: 0 additions & 24 deletions
This file was deleted.

components/mosquitto/examples/serverless_mqtt/esp_peer_setup/install.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@ echo "bin_dir: $1"
44

55
bin_dir="$1"
66
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
7-
ESP_PEER_VERSION="9512eef258a45aafcaaa309b1a67505c8b500363"
7+
ESP_PEER_VERSION="ccff3bd65cea750bf6c0abcf9d95b931ba9329f0"
88

99
ESP_PEER_URL="https://github.com/espressif/esp-webrtc-solution/archive/${ESP_PEER_VERSION}.zip"
1010
ESP_PEER_DIR="${bin_dir}/esp-peer"
1111
ZIP_PATH="${bin_dir}/esp-peer.zip"
1212
EXTRACTED_DIR="${ESP_PEER_DIR}/esp-webrtc-solution-${ESP_PEER_VERSION}"
1313
COMPONENTS_SRC="${EXTRACTED_DIR}/components"
1414
COMPONENTS_DST="${ESP_PEER_DIR}/components"
15-
PATCH_FILE_1="${THIS_DIR}/Add-default-event-to-http-client-handler.patch"
16-
PATCH_FILE_2="${THIS_DIR}/Remove-deprecated-freeRTOS-header.patch"
17-
PATCH_FILE_3="${THIS_DIR}/libpeer-Add-direct-dependency-to-libsrtp.patch"
15+
PATCH_FILE_1="${THIS_DIR}/Remove-deprecated-freeRTOS-header.patch"
16+
PATCH_FILE_2="${THIS_DIR}/libpeer-Add-direct-dependency-to-libsrtp.patch"
1817

1918
# Download if not exists
2019
if [ ! -d "$EXTRACTED_DIR" ]; then
@@ -23,7 +22,6 @@ if [ ! -d "$EXTRACTED_DIR" ]; then
2322
unzip -o "$ZIP_PATH" -d "$ESP_PEER_DIR"
2423
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_1"
2524
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_2"
26-
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_3"
2725
mv ${EXTRACTED_DIR}/components ${ESP_PEER_DIR}
2826
mv ${ESP_PEER_DIR}/components/esp_webrtc/impl/peer_default ${ESP_PEER_DIR}/components
2927
fi

components/mosquitto/examples/serverless_mqtt/main/peer_impl_juice.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ static void juice_recv(juice_agent_t *agent, const char *data, size_t size, void
238238
{
239239
if (s_local_mqtt) {
240240
s_on_recv(data, size);
241+
} else {
242+
ESP_LOGI(TAG, "No local mqtt client, dropping data");
241243
}
242244
}
243245

0 commit comments

Comments
 (0)