Skip to content

Commit

Permalink
Fix Travis failing with INFLUXDB_SUPPORT
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed Apr 4, 2019
1 parent 6732487 commit eb504e5
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions code/espurna/libs/SyncClientWrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

};

0 comments on commit eb504e5

Please sign in to comment.