vino r987 - in trunk: . server
- From: jwendell svn gnome org
- To: svn-commits-list gnome org
- Subject: vino r987 - in trunk: . server
- Date: Wed, 8 Oct 2008 14:29:47 +0000 (UTC)
Author: jwendell
Date: Wed Oct 8 14:29:47 2008
New Revision: 987
URL: http://svn.gnome.org/viewvc/vino?rev=987&view=rev
Log:
2008-10-08 Jonh Wendell <jwendell gnome org>
* server/vino-prefs.c: Propagates port changes via avahi.
Closes #555105.
Modified:
trunk/ChangeLog
trunk/server/vino-mdns.c
trunk/server/vino-prefs.c
Modified: trunk/server/vino-mdns.c
==============================================================================
--- trunk/server/vino-mdns.c (original)
+++ trunk/server/vino-mdns.c Wed Oct 8 14:29:47 2008
@@ -148,6 +148,11 @@
dprintf (MDNS, "Avahi: Failed to add %s on port %d : %s\n",
type, port, avahi_strerror (ret));
}
+ else
+ {
+ dprintf (MDNS, "Avahi: Successfuly added %s on port %d\n",
+ type, port);
+ }
}
static void
@@ -183,7 +188,7 @@
}
}
-void
+static void
vino_mdns_restart (void)
{
if (mdns_service_name != NULL)
@@ -297,6 +302,8 @@
void
vino_mdns_stop (void)
{
+ dprintf (MDNS, "Stopping MDNS support.\n");
+
if (mdns_service_name != NULL)
g_free (mdns_service_name);
mdns_service_name = NULL;
Modified: trunk/server/vino-prefs.c
==============================================================================
--- trunk/server/vino-prefs.c (original)
+++ trunk/server/vino-prefs.c Wed Oct 8 14:29:47 2008
@@ -278,6 +278,14 @@
}
static void
+vino_prefs_restart_mdns (VinoServer *server, gpointer data)
+{
+ vino_mdns_stop ();
+ vino_mdns_add_service ("_rfb._tcp", vino_server_get_port (server));
+ vino_mdns_start ();
+}
+
+static void
vino_prefs_use_alternative_port_changed (GConfClient *client,
guint cnxn_id,
GConfEntry *entry)
@@ -446,6 +454,9 @@
if (vino_enabled)
vino_mdns_start ();
+ g_signal_connect (server, "notify::alternative-port", vino_prefs_restart_mdns, NULL);
+ g_signal_connect (server, "notify::use-alternative-port", vino_prefs_restart_mdns, NULL);
+
icon = vino_server_get_status_icon (server);
vino_status_icon_set_visibility (icon, vino_icon_visibility);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]