Browse Source

Fix Travis failing with INFLUXDB_SUPPORT

rules-rpn
Max Prokhorov 5 years ago
parent
commit
eb504e5f58
1 changed files with 20 additions and 4 deletions
  1. +20
    -4
      code/espurna/libs/SyncClientWrap.h

+ 20
- 4
code/espurna/libs/SyncClientWrap.h View File

@ -9,13 +9,29 @@ Temporary wrap to fix https://github.com/me-no-dev/ESPAsyncTCP/issues/109
#include <SyncClient.h>
// ref Core 2.5.0: cores/esp8266/IPAddress.h
#ifndef CONST
#include <lwip/init.h>
#if LWIP_VERSION_MAJOR == 1
#define CONST
#else
#define CONST const
#endif
#endif
class SyncClientWrap: public SyncClient {
public:
SyncClientWrap() {}
~SyncClientWrap() {}
// int connect(const char*, uint16_t);
using SyncClient::connect;
int connect(const char *host, uint16_t port);
int connect(CONST IPAddress& ip, uint16_t port) { return connect(ip, port); }
bool flush(unsigned int maxWaitMs = 0) { flush(); return true; }
bool stop(unsigned int maxWaitMs = 0) { stop(); return true; }
int connect(CONST IPAddress& ip, uint16_t port) { IPAddress _ip(ip); return SyncClient::connect(_ip, port); }
bool flush(unsigned int maxWaitMs = 0) { SyncClient::flush(); return true; }
bool stop(unsigned int maxWaitMs = 0) { SyncClient::stop(); return true; }
};

Loading…
Cancel
Save