version 1.11.2.1, 2012/05/14 15:08:26
|
version 1.11.2.2, 2012/05/14 15:17:26
|
Line 516 io_gethostbyname(const char *psHost, u_short port, io_
|
Line 516 io_gethostbyname(const char *psHost, u_short port, io_
|
case AF_LOCAL: |
case AF_LOCAL: |
addr->sun.sun_len = sizeof(struct sockaddr_un); |
addr->sun.sun_len = sizeof(struct sockaddr_un); |
addr->sun.sun_family = AF_LOCAL; |
addr->sun.sun_family = AF_LOCAL; |
strlcpy(addr->sun.sun_path, psHost, sizeof addr->sun.sun_path); | memset(addr->sun.sun_path, 0, sizeof addr->sun.sun_path); |
| snprintf(addr->sun.sun_path, sizeof addr->sun.sun_path, "%s-%hu", psHost, port); |
return addr; |
return addr; |
default: |
default: |
io_SetErr(EPROTONOSUPPORT, "Unsuported address family %d", addr->sa.sa_family); |
io_SetErr(EPROTONOSUPPORT, "Unsuported address family %d", addr->sa.sa_family); |