[vino] Use integer (instead of double) as the port parameter in dbus calls.



commit 4ecf18eb28b4dbfc46da541b6668b027de089981
Author: Jonh Wendell <jwendell gnome org>
Date:   Sun Sep 6 10:26:54 2009 -0300

    Use integer (instead of double) as the port parameter in dbus calls.
    
    Regression in the tube merge. Closes #594104.

 server/dbus-interface.xml   |    6 +++---
 server/vino-dbus-listener.c |   37 ++++++++++++++++++-------------------
 2 files changed, 21 insertions(+), 22 deletions(-)
---
diff --git a/server/dbus-interface.xml b/server/dbus-interface.xml
index 75f3349..9859616 100644
--- a/server/dbus-interface.xml
+++ b/server/dbus-interface.xml
@@ -5,10 +5,10 @@
     <method name="GetInternalData">
       <arg name="hostname" direction="out" type="s"/>
       <arg name="avahi_hostname" direction="out" type="s"/>
-      <arg name="port" direction="out" type="d"/>
+      <arg name="port" direction="out" type="i"/>
     </method>
     <method name="GetExternalPort">
-      <arg name="port" direction="out" type="d"/>
+      <arg name="port" direction="out" type="i"/>
     </method>
     <method name="ShareWithTube">
       <arg name="connection" direction="in" type="o"/>
@@ -18,4 +18,4 @@
     <signal name="ServerInfoChanged">
     </signal>
   </interface>
-</node>
\ No newline at end of file
+</node>
diff --git a/server/vino-dbus-listener.c b/server/vino-dbus-listener.c
index 2c108df..3c04e32 100644
--- a/server/vino-dbus-listener.c
+++ b/server/vino-dbus-listener.c
@@ -81,22 +81,22 @@ enum
 
 static gboolean
 vino_dbus_listener_get_external_port (VinoDBusListener *listener,
-                                      gdouble *ret,
-                                      GError **error);
+                                      gint             *ret,
+                                      GError           **error);
 
 static gboolean
 vino_dbus_listener_get_internal_data (VinoDBusListener *listener,
-                                      char ** hostname,
-                                      char ** avahi_hostname,
-                                      gdouble * port,
-                                      GError **error);
+                                      char             **hostname,
+                                      char             **avahi_hostname,
+                                      gint             *port,
+                                      GError           **error);
 
 static gboolean
 vino_dbus_listener_share_with_tube (VinoDBusListener *listener,
-                                    const gchar * connection_path,
-                                    const gchar * tube_path,
-                                    GHashTable * properties,
-                                    GError **error);
+                                    const gchar      *connection_path,
+                                    const gchar      *tube_path,
+                                    GHashTable       *properties,
+                                    GError           **error);
 
 #include "dbus-interface-glue.h"
 
@@ -297,8 +297,8 @@ vino_dbus_listener_new (VinoServer *server)
 
 static gboolean
 vino_dbus_listener_get_external_port (VinoDBusListener *listener,
-                                      gdouble *ret,
-                                      GError **error)
+                                      gint             *ret,
+                                      GError           **error)
 {
   *ret = vino_server_get_external_port (listener->priv->server);
 
@@ -308,19 +308,18 @@ vino_dbus_listener_get_external_port (VinoDBusListener *listener,
 
 static gboolean
 vino_dbus_listener_get_internal_data (VinoDBusListener *listener,
-                                      char ** hostname,
-                                      char ** avahi_hostname,
-                                      gdouble * port,
-                                      GError **error)
+                                      char             **hostname,
+                                      char             **avahi_hostname,
+                                      gint             *port,
+                                      GError           **error)
 {
 #ifdef VINO_ENABLE_HTTP_SERVER
-  *port = (gdouble)vino_get_http_server_port (listener->priv->server);
+  *port = vino_get_http_server_port (listener->priv->server);
 #else
-  *port = (gdouble)vino_server_get_port (listener->priv->server);
+  *port = vino_server_get_port (listener->priv->server);
 #endif
 
   *hostname = get_local_hostname (listener);
-
   *avahi_hostname = g_strdup (vino_mdns_get_hostname ());
 
   return TRUE;



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