[Telepathy-commits] [telepathy-salut/master] Cope with setting up local socket failing in {Accept, Offer}File methods.

Jonny Lamb jonny.lamb at collabora.co.uk
Fri Nov 21 03:46:25 PST 2008


Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
 src/salut-file-channel.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/salut-file-channel.c b/src/salut-file-channel.c
index 1f05f01..b9256f1 100644
--- a/src/salut-file-channel.c
+++ b/src/salut-file-channel.c
@@ -934,7 +934,13 @@ salut_file_channel_accept_file (SalutSvcChannelTypeFile *iface,
       G_CALLBACK (ft_transferred_chunk_cb), self);
   g_signal_connect (ft, "canceled", G_CALLBACK (ft_remote_canceled_cb), self);
 
-  setup_local_socket (self);
+  if (!setup_local_socket(self))
+    {
+      DEBUG ("Could not set up local socket");
+      g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+          "Could not set up local socket");
+      dbus_g_method_return_error (context);
+    }
 
   DEBUG ("local socket %s", self->priv->socket_path);
 
@@ -1042,7 +1048,13 @@ salut_file_channel_offer_file (SalutSvcChannelTypeFile *iface,
       return;
     }
 
-  setup_local_socket(self);
+  if (!setup_local_socket(self))
+    {
+      DEBUG ("Could not set up local socket");
+      g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+          "Could not set up local socket");
+      dbus_g_method_return_error (context);
+    }
 
   g_value_init (&out_address, G_TYPE_STRING);
   g_value_set_string (&out_address, channel->priv->socket_path);
-- 
1.5.6.5




More information about the Telepathy-commits mailing list