1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

get error from getnameinfo if unable to improve hostname and use hostname

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2013-01-31 10:05:43 +08:00
parent cbb3122ab4
commit d09d7d45f8

View file

@ -1619,9 +1619,9 @@ libwebsocket_create_context(int port, const char *interf,
if (strlen(hostname) < sizeof(sa.sa_data) - 1) {
strcpy(sa.sa_data, hostname);
// lwsl_debug("my host name is %s\n", sa.sa_data);
lwsl_debug("my host name is %s\n", sa.sa_data);
n = getnameinfo(&sa, sizeof(sa), hostname,
(sizeof hostname) - 1, NULL, 0, 0);
(sizeof hostname) - 1, NULL, 0, NI_NAMEREQD);
}
if (!n) {