[vino] Fixes bug #581822 - vino server can not detect the real IP address On Solaris.
- From: Halton Huo <haltonhuo src gnome org>
- To: svn-commits-list gnome org
- Subject: [vino] Fixes bug #581822 - vino server can not detect the real IP address On Solaris.
- Date: Tue, 12 May 2009 00:42:57 -0400 (EDT)
commit 3078585f34373077ecb1734018df6690d9fcdac7
Author: Halton Huo <halton huo sun com>
Date: Fri May 8 11:55:26 2009 +0800
Fixes bug #581822 - vino server can not detect the real IP address On Solaris.
2009-05-08 Halton Huo <halton huo sun com>
* server/vino-dbus-listener.c:
(get_local_hostname): Use strncmp rather than strcmp to deal with different
loopback interface for Linux and Solaris.
---
server/vino-dbus-listener.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/vino-dbus-listener.c b/server/vino-dbus-listener.c
index d4bb085..8e7ddb4 100644
--- a/server/vino-dbus-listener.c
+++ b/server/vino-dbus-listener.c
@@ -126,7 +126,7 @@ get_local_hostname (VinoDBusListener *listener)
g_hash_table_iter_init (&iter, ipv4);
while (g_hash_table_iter_next (&iter, &key, &value))
{
- if (strcmp (key, "lo") == 0)
+ if (strncmp (key, "lo", 2) == 0)
continue;
retval = g_strdup (value);
goto the_end;
@@ -135,7 +135,7 @@ get_local_hostname (VinoDBusListener *listener)
g_hash_table_iter_init (&iter, ipv6);
while (g_hash_table_iter_next (&iter, &key, &value))
{
- if (strcmp (key, "lo") == 0)
+ if (strncmp (key, "lo", 2) == 0)
continue;
retval = g_strdup (value);
goto the_end;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]