Fix. setsockname fails with "*" as host.

Add. test_bind.lua
This commit is contained in:
moteus 2013-05-27 11:25:31 +04:00
parent 56dbda39ed
commit e54f78c61c
3 changed files with 9 additions and 1 deletions

View file

@ -222,7 +222,6 @@ static int meth_bind(lua_State *L)
bindhints.ai_socktype = SOCK_STREAM;
bindhints.ai_family = tcp->family;
bindhints.ai_flags = AI_PASSIVE;
address = strcmp(address, "*")? address: NULL;
err = inet_trybind(&tcp->sock, address, port, &bindhints);
if (err) {
lua_pushnil(L);