get error from getnameinfo if unable to improve hostname and use hostname 88/2988/1
authorAndy Green <andy.green@linaro.org>
Thu, 31 Jan 2013 02:05:43 +0000 (10:05 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:29 +0000 (13:01 -0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/libwebsockets.c

index cfe6b44..75302d0 100644 (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) {