Changeset 468


Ignore:
Timestamp:
Jun 26, 2021, 10:00:27 PM (3 years ago)
Author:
coas-nagasima
Message:

Ethernet版でもビルドが通るよう変更。

Location:
azure_iot_hub_f767zi/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • azure_iot_hub_f767zi/trunk/app_iothub_client/src/esp_at_socket.c

    r457 r468  
    15931593
    15941594        ER ret;
    1595         char temp[64];
     1595        char temp[128];
    15961596        sprintf(temp, "AT+CIPSTART=%d,\"%s\",\"%s\",%d\r\n", connection->link_id, connection->ssl, host, port);
    15971597        ret = esp_serial_write(connection->esp_state, temp, &res_kind, 10000);
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/Makefile

    r464 r468  
    5151OBJECTS += c-utility/adapters/lock_toppers.o
    5252OBJECTS += c-utility/adapters/platform_toppers.o
     53OBJECTS += c-utility/adapters/socketio_lwip.o
    5354OBJECTS += c-utility/adapters/socketio_esp_at.o
    5455OBJECTS += c-utility/adapters/threadapi_toppers.o
     
    6566OBJECTS += c-utility/src/constmap.o
    6667OBJECTS += c-utility/src/crt_abstractions.o
    67 #OBJECTS += c-utility/src/dns_resolver_sync.o
     68OBJECTS += c-utility/src/dns_resolver_sync.o
    6869OBJECTS += c-utility/src/doublylinkedlist.o
    6970OBJECTS += c-utility/src/gb_rand.o
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/c-utility/adapters/platform_toppers.c

    r464 r468  
    5050}
    5151
     52int use_wifi = 0;
     53
    5254const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void)
    5355{
    54         return tlsio_esp_at_get_interface_description();
    55         //return tlsio_wolfssl_get_interface_description();
     56        if (use_wifi) {
     57                return tlsio_esp_at_get_interface_description();
     58        }
     59        else {
     60                return tlsio_wolfssl_get_interface_description();
     61        }
    5662}
    5763
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/c-utility/adapters/socketio_lwip.c

    r457 r468  
    1414#undef _BSD_SOURCE
    1515#undef SOCKETIO_BERKELEY_UNDEF_BSD_SOURCE
     16#endif
     17
     18#ifndef MSG_NOSIGNAL
     19#define MSG_NOSIGNAL 0
    1620#endif
    1721
     
    3337#include <netdb.h>
    3438#include <unistd.h>
     39//#include <fcntl.h>
    3540#include <errno.h>
    3641#include "azure_c_shared_utility/singlylinkedlist.h"
     
    9398    IO_STATE io_state;
    9499    SINGLYLINKEDLIST_HANDLE pending_io_list;
    95     unsigned char recv_bytes[RECEIVE_BYTES_VALUE];
     100    unsigned char recv_bytes[XIO_RECEIVE_BUFFER_SIZE];
    96101    DNSRESOLVER_HANDLE dns_resolver;
    97102} SOCKET_IO_INSTANCE;
     
    932937                signal(SIGPIPE, SIG_IGN);
    933938
    934                 ssize_t send_result = send(socket_io_instance->socket, buffer, size, 0);
     939                ssize_t send_result = send(socket_io_instance->socket, buffer, size, MSG_NOSIGNAL);
    935940                if ((size_t)send_result != size)
    936941                {
     
    946951                        size_t bytes_sent = (send_result < 0 ? 0 : send_result);
    947952
    948                         if (add_pending_io(socket_io_instance, buffer + bytes_sent, size - bytes_sent, on_send_complete, callback_context) != 0)
     953                        if (add_pending_io(socket_io_instance, (const unsigned char*)buffer + bytes_sent, size - bytes_sent, on_send_complete, callback_context) != 0)
    949954                        {
    950955                            LogError("Failure: add_pending_io failed.");
     
    993998                }
    994999
    995                 ssize_t send_result = send(socket_io_instance->socket, pending_socket_io->bytes, pending_socket_io->size, 0);
     1000                ssize_t send_result = send(socket_io_instance->socket, pending_socket_io->bytes, pending_socket_io->size, MSG_NOSIGNAL);
    9961001                if ((send_result < 0) || ((size_t)send_result != pending_socket_io->size))
    9971002                {
     
    10451050                do
    10461051                {
    1047                     received = recv(socket_io_instance->socket, socket_io_instance->recv_bytes, RECEIVE_BYTES_VALUE, 0);
     1052                    received = recv(socket_io_instance->socket, socket_io_instance->recv_bytes, XIO_RECEIVE_BUFFER_SIZE, MSG_NOSIGNAL);
    10481053                    if (received > 0)
    10491054                    {
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/c-utility/pal/toppers/socket_async_os.h

    r457 r468  
    77// For Linux systems
    88#include <sys/types.h>
    9 //#include <lwip/sockets.h>
     9#include <lwip/sockets.h>
    1010#include <sys/select.h>
    1111#include <sys/errno.h>
    1212#include <unistd.h>
    13 //#include <netdb.h>
     13#include <netdb.h>
    1414
  • azure_iot_hub_f767zi/trunk/wolfssl-4.7.0/user_settings.h

    r464 r468  
    4949#define XBADFILE   NULL
    5050#define XFGETS     fgets
     51#define XFPRINTF   fprintf
    5152
    5253struct WOLFSSL;
Note: See TracChangeset for help on using the changeset viewer.