add binding to all available interfaces

This commit is contained in:
Justin Meza 2014-12-01 08:57:25 -08:00
parent d95f751de5
commit cfab7e4401
1 changed files with 5 additions and 1 deletions

View File

@ -17,7 +17,11 @@ ReturnObject *iopenWrapper(struct scopeobject *scope)
int port = getInteger(arg2);
inet_host_t *h = malloc(sizeof(inet_host_t));
inet_open(h, IN_PROT_TCP, addr, port);
if (!strcmp(addr, "ANY")) {
inet_open(h, IN_PROT_TCP, (const char *)IN_ADDR_ANY, port);
} else {
inet_open(h, IN_PROT_TCP, addr, port);
}
ValueObject *ret = createBlobValueObject(h);
return createReturnObject(RT_RETURN, ret);