summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-18 19:42:38 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-27 15:40:39 +0000
commitfa267ab39eed16c871aa055e3520ad260cd71138 (patch)
tree39277f337b29492cc570616ccbdb879dbad25577
parente403fb8e7ed288cd9e859672548fa07a52fffe45 (diff)
Use g_dbus_method_invocation_get_sender
-rw-r--r--src/mcd-dispatch-operation.c11
-rw-r--r--src/mcd-dispatcher.c2
2 files changed, 5 insertions, 8 deletions
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 09732469..eb081d3e 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -521,7 +521,7 @@ _mcd_dispatch_operation_check_client_locks (McdDispatchOperation *self)
{
/* this needs to be copied because we don't use it til after we've
* freed approval->context */
- gchar *caller = g_strdup (dbus_g_method_get_sender (
+ gchar *caller = g_strdup (g_dbus_method_invocation_get_sender (
approval->context));
/* remove this approval from the list, so it won't be treated as a
@@ -852,7 +852,7 @@ _mcd_dispatch_operation_finish (McdDispatchOperation *operation,
/* someone else got it - either another Claim() or a handler */
g_assert (approval->context != NULL);
DEBUG ("denying Claim call from %s",
- dbus_g_method_get_sender (approval->context));
+ g_dbus_method_invocation_get_sender (approval->context));
g_dbus_method_invocation_return_gerror (approval->context, priv->result);
approval->context = NULL;
break;
@@ -1004,7 +1004,7 @@ dispatch_operation_claim (TpSvcChannelDispatchOperation *cdo,
{
McdDispatchOperation *self = MCD_DISPATCH_OPERATION (cdo);
ClaimAttempt *claim_attempt;
- gchar *sender = dbus_g_method_get_sender (context);
+ const gchar *sender = g_dbus_method_invocation_get_sender (context);
McpDispatchOperation *plugin_api = MCP_DISPATCH_OPERATION (
self->priv->plugin_api);
const GList *p;
@@ -1014,7 +1014,7 @@ dispatch_operation_claim (TpSvcChannelDispatchOperation *cdo,
DEBUG ("Giving error to %s: %s", sender, self->priv->result->message);
g_dbus_method_invocation_return_gerror (context, self->priv->result);
- goto finally;
+ return;
}
claim_attempt = g_slice_new0 (ClaimAttempt);
@@ -1041,9 +1041,6 @@ dispatch_operation_claim (TpSvcChannelDispatchOperation *cdo,
if (claim_attempt->handler_suitable_pending == 0)
claim_attempt_resolve (claim_attempt);
-
-finally:
- g_free (sender);
}
static void
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index a9c7f1ed..9639b2ed 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -1947,7 +1947,7 @@ dispatcher_delegate_channels (
ctx = delegate_channels_ctx_new (self, user_action_time, context);
- sender = dbus_g_method_get_sender (context);
+ sender = g_dbus_method_invocation_get_sender (context);
g_object_get (self->priv->master, "account-manager", &am, NULL);
g_assert (am != NULL);