]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-tp-file.c
Updated Basque language
[empathy.git] / libempathy / empathy-tp-file.c
index 998de5e51fa6385713d0de032e0dae0986765588..c43fa0be744f43407df495acf6f0765949285e75 100644 (file)
@@ -40,6 +40,7 @@
 #include <telepathy-glib/gtypes.h>
 #include <telepathy-glib/proxy-subclass.h>
 #include <telepathy-glib/util.h>
+#include <telepathy-glib/interfaces.h>
 
 #include "empathy-tp-file.h"
 #include "empathy-marshal.h"
@@ -163,22 +164,17 @@ tp_file_get_available_socket_types_cb (TpProxy *proxy,
       GUINT_TO_POINTER (TP_SOCKET_ADDRESS_TYPE_IPV4))) != NULL)
     {
       priv->socket_address_type = TP_SOCKET_ADDRESS_TYPE_IPV4;
-      g_array_sort (access_controls, empathy_uint_compare);
-
-      /* here port is preferred over localhost */
-      if ((g_array_index (access_controls, guint, 0) ==
-          TP_SOCKET_ACCESS_CONTROL_LOCALHOST) &&
-          (g_array_index (access_controls, guint, 1) ==
-          TP_SOCKET_ACCESS_CONTROL_PORT))
-        priv->socket_access_control = TP_SOCKET_ACCESS_CONTROL_PORT;
-      else
-        priv->socket_access_control =
-            g_array_index (access_controls, guint, 0);
+
+      /* TODO: we should prefer PORT over LOCALHOST when the CM will
+       * support it.
+       */
+
+      priv->socket_access_control = TP_SOCKET_ACCESS_CONTROL_LOCALHOST;
     }
 
 out:
   DEBUG ("Socket address type: %u, access control %u",
-      priv->socket_address_type, priv->socket_access_control);  
+      priv->socket_address_type, priv->socket_access_control);
 }
 
 static void
@@ -510,13 +506,14 @@ ft_operation_provide_or_accept_file_cb (TpChannel *proxy,
           * report the method error.
           */
           g_clear_error (&myerr);
-          myerr = g_error_copy (error);
         }
+
+      myerr = g_error_copy (error);
     }
 
   if (myerr != NULL)
     {
-      DEBUG ("Error: %s", error->message);
+      DEBUG ("Error: %s", myerr->message);
       ft_operation_close_with_error (tp_file, myerr);
       g_clear_error (&myerr);
       return;
@@ -571,15 +568,12 @@ static void
 initialize_empty_ac_variant (TpSocketAccessControl ac,
     GValue *val)
 {
+  /* TODO: we will add more types here once we support PORT access control. */
   if (ac == TP_SOCKET_ACCESS_CONTROL_LOCALHOST)
     {
       g_value_init (val, G_TYPE_STRING);
       g_value_set_static_string (val, "");
     }
-  else if (ac == TP_SOCKET_ACCESS_CONTROL_PORT)
-    {
-      g_value_init (val, TP_STRUCT_TYPE_SOCKET_ADDRESS_IPV4);
-    }
 }
 
 static void