fix(websocket): fix of websocket host example

This commit is contained in:
Suren Gabrielyan
2024-06-26 13:28:23 +04:00
committed by Suren Gabrielyan
parent 906e447193
commit 5ccc018a98
5 changed files with 7 additions and 14 deletions

View File

@ -71,8 +71,10 @@ jobs:
TEST_DIR: components/esp_modem/${{ matrix.test.path }} TEST_DIR: components/esp_modem/${{ matrix.test.path }}
steps: steps:
- name: Clear repository - name: Clear repository
run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE run: |
- uses: actions/checkout@v3 sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
- name: Checkout repository with sparse-checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: modem_target_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.test.app }} name: modem_target_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.test.app }}

View File

@ -5,6 +5,7 @@
*/ */
#pragma once #pragma once
#include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>

View File

@ -6,7 +6,6 @@ set(common_component_dir ../../../../common_components)
set(EXTRA_COMPONENT_DIRS set(EXTRA_COMPONENT_DIRS
../.. ../..
"${common_component_dir}/linux_compat/esp_timer" "${common_component_dir}/linux_compat/esp_timer"
"${common_component_dir}/linux_compat"
"${common_component_dir}/linux_compat/freertos" "${common_component_dir}/linux_compat/freertos"
$ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs $ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs
$ENV{IDF_PATH}/examples/common_components/protocol_examples_common) $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)

View File

@ -1,6 +1,4 @@
idf_component_register(SRCS "main.c" idf_component_register(SRCS "websocket_linux.c"
INCLUDE_DIRS
"."
REQUIRES esp_websocket_client protocol_examples_common) REQUIRES esp_websocket_client protocol_examples_common)
if(CONFIG_GCOV_ENABLED) if(CONFIG_GCOV_ENABLED)

View File

@ -3,20 +3,13 @@
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <stdio.h> #include <esp_log.h>
#include "esp_log.h"
#include "nvs_flash.h" #include "nvs_flash.h"
#include "protocol_examples_common.h" #include "protocol_examples_common.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/event_groups.h"
#include "esp_websocket_client.h" #include "esp_websocket_client.h"
#include "esp_system.h" #include "esp_system.h"
#include "esp_event.h" #include "esp_event.h"
#include "esp_log.h"
#include "esp_netif.h" #include "esp_netif.h"
static const char *TAG = "websocket"; static const char *TAG = "websocket";