diff options
| author | Fabio Alessandrelli | 2016-10-22 07:23:07 +0200 |
|---|---|---|
| committer | Rémi Verschelde | 2016-10-26 08:20:31 +0200 |
| commit | 80e911647c5df21c5b6a06876f1d48e21cd1f5fc (patch) | |
| tree | 6fc3a52e19b24492bdcbf6e231ccb7b9fa536c42 /drivers/unix/tcp_server_posix.cpp | |
| parent | a3131a6b5bf5357e5c70ba6fea4a0963f4b341b4 (diff) | |
| download | godot-80e911647c5df21c5b6a06876f1d48e21cd1f5fc.tar.gz godot-80e911647c5df21c5b6a06876f1d48e21cd1f5fc.tar.zst godot-80e911647c5df21c5b6a06876f1d48e21cd1f5fc.zip | |
Diffstat (limited to 'drivers/unix/tcp_server_posix.cpp')
| -rw-r--r-- | drivers/unix/tcp_server_posix.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/unix/tcp_server_posix.cpp b/drivers/unix/tcp_server_posix.cpp index 27c561847..05b739804 100644 --- a/drivers/unix/tcp_server_posix.cpp +++ b/drivers/unix/tcp_server_posix.cpp @@ -87,11 +87,11 @@ Error TCPServerPosix::listen(uint16_t p_port, IP_Address::AddrType p_type, const } struct sockaddr_storage addr; - _set_listen_sockaddr(&addr, p_port, p_type, p_accepted_hosts); + size_t addr_size = _set_listen_sockaddr(&addr, p_port, p_type, p_accepted_hosts); // automatically fill with my IP TODO: use p_accepted_hosts - if (bind(sockfd, (struct sockaddr *)&addr, sizeof addr) != -1) { + if (bind(sockfd, (struct sockaddr *)&addr, addr_size) != -1) { if (::listen(sockfd, 1) == -1) { |
