Skip to content

Commit eb504e5

Browse files
committed
Fix Travis failing with INFLUXDB_SUPPORT
1 parent 6732487 commit eb504e5

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

code/espurna/libs/SyncClientWrap.h

+20-4
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,29 @@ Temporary wrap to fix https://github.com/me-no-dev/ESPAsyncTCP/issues/109
99

1010
#include <SyncClient.h>
1111

12+
// ref Core 2.5.0: cores/esp8266/IPAddress.h
13+
#ifndef CONST
14+
#include <lwip/init.h>
15+
16+
#if LWIP_VERSION_MAJOR == 1
17+
#define CONST
18+
#else
19+
#define CONST const
20+
#endif
21+
22+
#endif
23+
1224
class SyncClientWrap: public SyncClient {
1325

1426
public:
27+
SyncClientWrap() {}
28+
~SyncClientWrap() {}
29+
30+
// int connect(const char*, uint16_t);
31+
using SyncClient::connect;
1532

16-
int connect(const char *host, uint16_t port);
17-
int connect(CONST IPAddress& ip, uint16_t port) { return connect(ip, port); }
18-
bool flush(unsigned int maxWaitMs = 0) { flush(); return true; }
19-
bool stop(unsigned int maxWaitMs = 0) { stop(); return true; }
33+
int connect(CONST IPAddress& ip, uint16_t port) { IPAddress _ip(ip); return SyncClient::connect(_ip, port); }
34+
bool flush(unsigned int maxWaitMs = 0) { SyncClient::flush(); return true; }
35+
bool stop(unsigned int maxWaitMs = 0) { SyncClient::stop(); return true; }
2036

2137
};

0 commit comments

Comments
 (0)