[gtk-vnc-devel] [patch] ipv6
- From: Jonh Wendell <jwendell gnome org>
- To: gtk-vnc-devel List <gtk-vnc-devel lists sourceforge net>
- Subject: [gtk-vnc-devel] [patch] ipv6
- Date: Thu, 19 Feb 2009 11:34:52 -0300
Hi, folks, with this trivial patch I'm able to connect into ipv6 address
hosts. Also, I changed a bit the error messages in debug output.
Okay?
--
Jonh Wendell
http://www.bani.com.br
diff -r d68935d582f0 src/gvnc.c
--- a/src/gvnc.c Sun Dec 07 19:56:56 2008 +0000
+++ b/src/gvnc.c Thu Feb 19 11:33:12 2009 -0300
@@ -2919,12 +2919,11 @@
GVNC_DEBUG("Resolving host %s %s\n", host, port);
memset (&hints, '\0', sizeof (hints));
- hints.ai_flags = AI_ADDRCONFIG;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
if ((ret = getaddrinfo(host, port, &hints, &ai)) != 0) {
- GVNC_DEBUG ("Failed to resolve hostname\n");
+ GVNC_DEBUG ("Failed to resolve hostname: %s\n", gai_strerror (ret));
return FALSE;
}
@@ -2973,7 +2972,7 @@
errno != EHOSTUNREACH) {
g_io_channel_unref(chan);
close(fd);
- GVNC_DEBUG ("Failed with errno = %d\n", errno);
+ GVNC_DEBUG ("Failed with errno = %d => %s\n", errno, sys_errlist[errno]);
break;
}
close(fd);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]