mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
merge mqttClinet PR 115 from BertMelis
This commit is contained in:
@@ -40,8 +40,7 @@ bool ClientPosix::connect(IPAddress ip, uint16_t port) {
|
||||
_host.sin_addr.s_addr = htonl(uint32_t(ip));
|
||||
_host.sin_port = htons(port); // modified by proddy for EMS-ESP compiling standalone
|
||||
|
||||
int ret = ::connect(_sockfd, (struct sockaddr *)&_host, sizeof(_host));
|
||||
|
||||
int ret = ::connect(_sockfd, reinterpret_cast<sockaddr*>(&_host), sizeof(_host));
|
||||
if (ret < 0) {
|
||||
emc_log_e("Error connecting: %d - (%d) %s", ret, errno, strerror(errno));
|
||||
return false;
|
||||
|
||||
@@ -43,7 +43,7 @@ class ClientPosix : public Transport {
|
||||
|
||||
protected:
|
||||
int _sockfd;
|
||||
struct sockaddr_in _host;
|
||||
sockaddr_in _host;
|
||||
};
|
||||
|
||||
} // namespace espMqttClientInternals
|
||||
|
||||
Reference in New Issue
Block a user