diff options
author | moteus <mimir@newmail.ru> | 2013-05-27 11:25:31 +0400 |
---|---|---|
committer | moteus <mimir@newmail.ru> | 2013-05-27 11:25:31 +0400 |
commit | e54f78c61cac7b0d7fe1e89d337b9ab06f40bdb0 (patch) | |
tree | a0e80fdaa6a6ce9fe38964e7fb49a0aa0b64c7c0 /src/tcp.c | |
parent | 56dbda39ed07faf2c14427797fe104213f734e00 (diff) | |
download | luasocket-e54f78c61cac7b0d7fe1e89d337b9ab06f40bdb0.tar.gz luasocket-e54f78c61cac7b0d7fe1e89d337b9ab06f40bdb0.tar.bz2 luasocket-e54f78c61cac7b0d7fe1e89d337b9ab06f40bdb0.zip |
Fix. setsockname fails with "*" as host.
Add. test_bind.lua
Diffstat (limited to 'src/tcp.c')
-rw-r--r-- | src/tcp.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -222,7 +222,6 @@ static int meth_bind(lua_State *L) | |||
222 | bindhints.ai_socktype = SOCK_STREAM; | 222 | bindhints.ai_socktype = SOCK_STREAM; |
223 | bindhints.ai_family = tcp->family; | 223 | bindhints.ai_family = tcp->family; |
224 | bindhints.ai_flags = AI_PASSIVE; | 224 | bindhints.ai_flags = AI_PASSIVE; |
225 | address = strcmp(address, "*")? address: NULL; | ||
226 | err = inet_trybind(&tcp->sock, address, port, &bindhints); | 225 | err = inet_trybind(&tcp->sock, address, port, &bindhints); |
227 | if (err) { | 226 | if (err) { |
228 | lua_pushnil(L); | 227 | lua_pushnil(L); |