[vino/gnome-2-26] Fixes bug #581822 - vino server can not detect the real IP address On Solaris.
- From: Jonh Wendell <jwendell src gnome org>
- To: svn-commits-list gnome org
- Subject: [vino/gnome-2-26] Fixes bug #581822 - vino server can not detect the real IP address On Solaris.
- Date: Tue, 12 May 2009 07:42:31 -0400 (EDT)
commit e8155a6b239c4dc249242a4103a08c9c585c61ca
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 bebcf0a..71a6cb7 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]