[vino] Added back basic mdns functionality.



commit 9d2c85b3b9ccc2c10de4bad3d08f787e445561ce
Author: Chris Kühl <chrisk openismus com>
Date:   Wed Feb 23 11:09:26 2011 +0100

    Added back basic mdns functionality.

 server/vino-dbus-listener.c |    4 +++-
 server/vino-main.c          |    7 +++++++
 2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/server/vino-dbus-listener.c b/server/vino-dbus-listener.c
index 9c8df97..20a586d 100644
--- a/server/vino-dbus-listener.c
+++ b/server/vino-dbus-listener.c
@@ -33,6 +33,8 @@
 #include "vino-http.h"
 #endif
 
+#include "vino-mdns.h"
+
 struct _VinoDBusListener
 {
   GObject  parent_instance;
@@ -169,7 +171,7 @@ vino_dbus_listener_get_property (GDBusConnection  *connection,
     return g_variant_new_uint16 (vino_server_get_external_port (listener->server));
 
   else if (strcmp (property_name, "AvahiHost") == 0)
-    return g_variant_new_string ("aaa");
+    return g_variant_new_string (vino_mdns_get_hostname());
 
   else
     g_assert_not_reached ();
diff --git a/server/vino-main.c b/server/vino-main.c
index 16dc1b2..fda0f83 100644
--- a/server/vino-main.c
+++ b/server/vino-main.c
@@ -156,6 +156,11 @@ name_acquired (GDBusConnection *connection,
       vino_dbus_listener_set_server (vino->listeners[i], server);
       vino_server_set_on_hold (server, FALSE);
 
+      if (g_settings_get_boolean (vino->settings, "enabled"))
+        {
+          vino_mdns_start(vino_server_get_network_interface (server));
+        }
+
       g_object_unref (server);
     }
 }
@@ -265,6 +270,8 @@ main (int argc, char **argv)
       g_free (vino.listeners);
     }
 
+  vino_mdns_shutdown ();
+
   g_main_loop_unref (vino.main_loop);
   g_object_unref (vino.sm_client);
   g_object_unref (vino.settings);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]