[vino/gnome-2-26] Fixes bug #581822 - vino server can not detect the real IP address On Solaris.



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]