telepathy-rakia: Replace deprecated TP_ERRORS with TP_ERROR

Simon McVittie smcv at kemper.freedesktop.org
Thu May 10 05:40:11 PDT 2012


Module: telepathy-rakia
Branch: master
Commit: fdc35c8bf08e133eb32b13cf7d0ced32c6193252
URL:    http://cgit.freedesktop.org/telepathy/telepathy-rakia/commit/?id=fdc35c8bf08e133eb32b13cf7d0ced32c6193252

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Thu May 10 12:55:05 2012 +0100

Replace deprecated TP_ERRORS with TP_ERROR

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49732
Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
Reviewed-by: Xavier Claessens <xavier.claessens at collabora.co.uk>

---

 rakia/call-content.c        |    2 +-
 rakia/call-stream.c         |    4 ++--
 rakia/connection-aliasing.c |    2 +-
 rakia/handles.c             |    2 +-
 rakia/media-manager.c       |    2 +-
 rakia/text-channel.c        |    4 ++--
 rakia/text-manager.c        |    2 +-
 src/sip-connection.c        |    6 +++---
 8 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/rakia/call-content.c b/rakia/call-content.c
index 314b04a..f07f020 100644
--- a/rakia/call-content.c
+++ b/rakia/call-content.c
@@ -300,7 +300,7 @@ md_offer_cb (GObject *obj, GAsyncResult *res, gpointer user_data)
   else
     {
       /* Only reject if the codecs where rejected */
-      if (error->domain == TP_ERRORS &&
+      if (error->domain == TP_ERROR &&
           error->code == TP_ERROR_MEDIA_CODECS_INCOMPATIBLE)
         {
           g_assert (!is_initial_offer);
diff --git a/rakia/call-stream.c b/rakia/call-stream.c
index cc558f2..d4b0612 100644
--- a/rakia/call-stream.c
+++ b/rakia/call-stream.c
@@ -375,7 +375,7 @@ rakia_call_stream_add_local_candidates (TpBaseMediaCallStream *stream,
 
   if (accepted_candidates->len == 0)
     {
-      g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+      g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
           "No valid candidate passed");
       g_ptr_array_unref (accepted_candidates);
       return NULL;
@@ -421,7 +421,7 @@ rakia_call_stream_finish_initial_candidates (TpBaseMediaCallStream *stream,
 
   if (!rakia_sip_media_local_candidates_prepared (priv->media))
     {
-      g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+      g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
           "You need to set a candidate on component 1 first.");
       return FALSE;
     }
diff --git a/rakia/connection-aliasing.c b/rakia/connection-aliasing.c
index 252d24f..87c696d 100644
--- a/rakia/connection-aliasing.c
+++ b/rakia/connection-aliasing.c
@@ -314,7 +314,7 @@ rakia_connection_set_aliases (TpSvcConnectionInterfaceAliasing *iface,
   if (alias == NULL || g_hash_table_size (aliases) > 1)
     {
       /* One of the handles (if there are any) cannot be the self handle */
-      GError err = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+      GError err = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
           "Cannot set aliases for any contact except self" };
       dbus_g_method_return_error (context, &err);
       return;
diff --git a/rakia/handles.c b/rakia/handles.c
index 7819131..25b77b2 100644
--- a/rakia/handles.c
+++ b/rakia/handles.c
@@ -337,7 +337,7 @@ rakia_normalize_contact (const gchar *sipuri,
 
 error:
   if (retval == NULL)
-      g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+      g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
           "invalid SIP URI");
 
   su_home_deinit (home);
diff --git a/rakia/media-manager.c b/rakia/media-manager.c
index db4631e..b5b1382 100644
--- a/rakia/media-manager.c
+++ b/rakia/media-manager.c
@@ -647,7 +647,7 @@ rakia_media_manager_requestotron (TpChannelManager *manager,
    * Call channel type */
   if (handle == conn->self_handle)
     {
-      g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+      g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
           "Cannot call self");
       goto error;
     }
diff --git a/rakia/text-channel.c b/rakia/text-channel.c
index ab76965..589647c 100644
--- a/rakia/text-channel.c
+++ b/rakia/text-channel.c
@@ -657,7 +657,7 @@ rakia_text_channel_send_message (GObject *object,
 #define INVALID_ARGUMENT(msg, ...) \
   G_STMT_START { \
     DEBUG (msg , ## __VA_ARGS__); \
-    g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, \
+    g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, \
         msg , ## __VA_ARGS__); \
     goto fail; \
   } G_STMT_END
@@ -692,7 +692,7 @@ rakia_text_channel_send_message (GObject *object,
   msg_nh = rakia_base_connection_create_handle (priv->conn, priv->handle);
   if (msg_nh == NULL)
     {
-      g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+      g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
           "Request creation failed");
       goto fail;
     }
diff --git a/rakia/text-manager.c b/rakia/text-manager.c
index 520e501..37d48a4 100644
--- a/rakia/text-manager.c
+++ b/rakia/text-manager.c
@@ -397,7 +397,7 @@ rakia_text_manager_requestotron (RakiaTextManager *self,
 
   if (require_new)
     {
-      g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+      g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
           "Already chatting with contact #%u in another channel", handle);
       goto error;
     }
diff --git a/src/sip-connection.c b/src/sip-connection.c
index 9719dd9..02c9c3e 100644
--- a/src/sip-connection.c
+++ b/src/sip-connection.c
@@ -1034,7 +1034,7 @@ rakia_connection_start_connecting (TpBaseConnection *base,
   priv->account_url = rakia_handle_inspect_uri (base, base->self_handle);
   if (priv->account_url == NULL)
     {
-      g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+      g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
           "Failed to create the account URI");
       return FALSE;
     }
@@ -1063,7 +1063,7 @@ rakia_connection_start_connecting (TpBaseConnection *base,
       TAG_NULL());
   if (priv->sofia_nua == NULL)
     {
-      g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+      g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
           "Unable to create SIP stack");
       return FALSE;
     }
@@ -1094,7 +1094,7 @@ rakia_connection_start_connecting (TpBaseConnection *base,
                                                          base->self_handle);
   if (priv->register_op == NULL)
     {
-      g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+      g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
           "Unable to create registration handle for address %s", sip_address);
       return FALSE;
     }



More information about the telepathy-commits mailing list