[next] telepathy-mission-control: Replace dbus_g_method_return_error with g_dbus_method_invocation_return_gerror
Simon McVittie
smcv at kemper.freedesktop.org
Thu Apr 3 07:28:01 PDT 2014
Module: telepathy-mission-control
Branch: next
Commit: b08a02ed5d6e0c57e3a17af2c2c2a3561b5eaabc
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=b08a02ed5d6e0c57e3a17af2c2c2a3561b5eaabc
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Tue Mar 18 19:28:19 2014 +0000
Replace dbus_g_method_return_error with g_dbus_method_invocation_return_gerror
---
src/mcd-account-manager.c | 2 +-
src/mcd-account.c | 4 ++--
src/mcd-dbusprop.c | 6 +++---
src/mcd-dispatch-operation.c | 16 ++++++++--------
src/mcd-dispatcher.c | 12 ++++++------
src/request.c | 4 ++--
6 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index 8330bcd..bc0a085 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -946,7 +946,7 @@ create_account_cb (McdAccountManager *account_manager, McdAccount *account,
if (G_UNLIKELY (error))
{
- dbus_g_method_return_error (context, (GError *)error);
+ g_dbus_method_invocation_return_gerror (context, (GError *)error);
return;
}
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 04ef335..2c4b273 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -2155,7 +2155,7 @@ account_remove_delete_cb (GObject *source,
if (!mcd_account_delete_finish (MCD_ACCOUNT (source), res, &error))
{
- dbus_g_method_return_error (data->context, (GError *) error);
+ g_dbus_method_invocation_return_gerror (data->context, (GError *) error);
g_error_free (error);
return;
}
@@ -2635,7 +2635,7 @@ account_update_parameters_cb (McdAccount *account, GPtrArray *not_yet,
if (error != NULL)
{
- dbus_g_method_return_error (context, (GError *) error);
+ g_dbus_method_invocation_return_gerror (context, (GError *) error);
return;
}
diff --git a/src/mcd-dbusprop.c b/src/mcd-dbusprop.c
index 567b591..c3e60a2 100644
--- a/src/mcd-dbusprop.c
+++ b/src/mcd-dbusprop.c
@@ -198,7 +198,7 @@ dbusprop_set (TpSvcDBusProperties *self,
value, &error);
if (error)
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -247,7 +247,7 @@ dbusprop_get (TpSvcDBusProperties *self,
if (error)
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -322,7 +322,7 @@ dbusprop_get_all (TpSvcDBusProperties *self,
{
g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"invalid interface: %s", interface_name);
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index f8674e2..0973246 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -853,7 +853,7 @@ _mcd_dispatch_operation_finish (McdDispatchOperation *operation,
g_assert (approval->context != NULL);
DEBUG ("denying Claim call from %s",
dbus_g_method_get_sender (approval->context));
- dbus_g_method_return_error (approval->context, priv->result);
+ g_dbus_method_invocation_return_gerror (approval->context, priv->result);
approval->context = NULL;
break;
@@ -881,7 +881,7 @@ _mcd_dispatch_operation_finish (McdDispatchOperation *operation,
DEBUG ("HandleWith -> NotYours: wanted %s but "
"%s got it instead", approval->client_bus_name,
successful_handler);
- dbus_g_method_return_error (approval->context,
+ g_dbus_method_invocation_return_gerror (approval->context,
priv->result);
approval->context = NULL;
}
@@ -895,7 +895,7 @@ _mcd_dispatch_operation_finish (McdDispatchOperation *operation,
DEBUG ("HandleWith -> error: %s %d: %s",
g_quark_to_string (priv->result->domain),
priv->result->code, priv->result->message);
- dbus_g_method_return_error (approval->context, priv->result);
+ g_dbus_method_invocation_return_gerror (approval->context, priv->result);
approval->context = NULL;
}
@@ -941,7 +941,7 @@ dispatch_operation_handle_with (TpSvcChannelDispatchOperation *cdo,
if (!mcd_dispatch_operation_check_handle_with (self, handler_name, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -985,7 +985,7 @@ claim_attempt_suitability_cb (GObject *source,
MCP_DISPATCH_OPERATION_POLICY (source), res, &error))
{
if (claim_attempt->context != NULL)
- dbus_g_method_return_error (claim_attempt->context, error);
+ g_dbus_method_invocation_return_gerror (claim_attempt->context, error);
claim_attempt->context = NULL;
g_error_free (error);
@@ -1013,7 +1013,7 @@ dispatch_operation_claim (TpSvcChannelDispatchOperation *cdo,
{
DEBUG ("Giving error to %s: %s", sender, self->priv->result->message);
- dbus_g_method_return_error (context, self->priv->result);
+ g_dbus_method_invocation_return_gerror (context, self->priv->result);
goto finally;
}
@@ -1724,7 +1724,7 @@ _mcd_dispatch_operation_set_handler_failed (McdDispatchOperation *self,
if (approval->type == APPROVAL_TYPE_HANDLE_WITH &&
!tp_strdiff (approval->client_bus_name, bus_name))
{
- dbus_g_method_return_error (approval->context, (GError *) error);
+ g_dbus_method_invocation_return_gerror (approval->context, (GError *) error);
approval->context = NULL;
approval_free (approval);
g_queue_delete_link (self->priv->approvals, iter);
@@ -2337,7 +2337,7 @@ _mcd_dispatch_operation_try_next_handler (McdDispatchOperation *self)
g_queue_pop_head (self->priv->approvals);
- dbus_g_method_return_error (approval->context, &gone);
+ g_dbus_method_invocation_return_gerror (approval->context, &gone);
approval->context = NULL;
approval_free (approval);
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 00e5a27..a9c7f1e 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -1288,7 +1288,7 @@ dispatcher_request_channel (McdDispatcher *self,
goto finally;
despair:
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
finally:
@@ -1443,7 +1443,7 @@ message_context_return_error (MessageContext *context, const GError *error)
if (context->dbus_context == NULL)
return;
- dbus_g_method_return_error (context->dbus_context, error);
+ g_dbus_method_invocation_return_gerror (context->dbus_context, error);
context->dbus_context = NULL;
}
@@ -1469,7 +1469,7 @@ message_context_free (gpointer ctx)
error = g_error_new_literal (TP_ERROR, TP_ERROR_TERMINATED,
"Channel request failed");
- dbus_g_method_return_error (context->dbus_context, error);
+ g_dbus_method_invocation_return_gerror (context->dbus_context, error);
g_error_free (error);
}
@@ -2016,7 +2016,7 @@ dispatcher_delegate_channels (
return;
error:
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
tp_clear_pointer (&ctx, delegate_channels_ctx_free);
@@ -2040,7 +2040,7 @@ present_handle_channel_cb (TpClient *client,
if (error != NULL)
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
return;
}
@@ -2107,7 +2107,7 @@ dispatcher_present_channel (
return;
error:
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
}
diff --git a/src/request.c b/src/request.c
index 8786089..02d7198 100644
--- a/src/request.c
+++ b/src/request.c
@@ -691,7 +691,7 @@ _mcd_request_proceed (McdRequest *self,
"Proceed has already been called; stop calling it" };
if (context != NULL)
- dbus_g_method_return_error (context, &na);
+ g_dbus_method_invocation_return_gerror (context, &na);
return;
}
@@ -923,7 +923,7 @@ channel_request_cancel (TpSvcChannelRequest *iface,
}
else
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
}
}
More information about the telepathy-commits
mailing list