Skip to content

Commit

Permalink
sockaddr
Browse files Browse the repository at this point in the history
  • Loading branch information
bertmelis authored Oct 31, 2023
1 parent 58aa51b commit 830cbe0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Transport/ClientPosix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bool ClientPosix::connect(IPAddress ip, uint16_t port) {
_host.sin_addr.s_addr = htonl(uint32_t(ip));
_host.sin_port = ::htons(port);

int ret = ::connect(_sockfd, static_cast<struct sockaddr *>(&_host), sizeof(_host));
int ret = ::connect(_sockfd, static_cast<sockaddr*>(&_host), sizeof(_host));

if (ret < 0) {
emc_log_e("Error connecting: %d - (%d) %s", ret, errno, strerror(errno));
Expand Down
2 changes: 1 addition & 1 deletion src/Transport/ClientPosix.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ClientPosix : public Transport {

protected:
int _sockfd;
struct sockaddr_in _host;
sockaddr_in _host;
};

} // namespace espMqttClientInternals
Expand Down

0 comments on commit 830cbe0

Please sign in to comment.