telepathy-mission-control: Inline what' s left of mcd_dispatcher_context_proceed into its only caller
Simon McVittie
smcv at kemper.freedesktop.org
Thu May 10 08:15:18 PDT 2012
Module: telepathy-mission-control
Branch: master
Commit: 1f3fa4e2322daef9e965e2159c4ebd0b9ae2a9dd
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=1f3fa4e2322daef9e965e2159c4ebd0b9ae2a9dd
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Tue May 8 14:08:25 2012 +0100
Inline what's left of mcd_dispatcher_context_proceed into its only caller
---
src/mcd-dispatcher.c | 43 +++++++++++++++----------------------------
1 files changed, 15 insertions(+), 28 deletions(-)
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 93c62a8..347480c 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -300,8 +300,6 @@ on_operation_finished (McdDispatchOperation *operation,
}
}
-static void mcd_dispatcher_context_proceed (McdDispatcherContext *context);
-
static void
_mcd_dispatcher_enter_state_machine (McdDispatcher *dispatcher,
GList *channels,
@@ -369,8 +367,21 @@ _mcd_dispatcher_enter_state_machine (McdDispatcher *dispatcher,
sp_timestamp ("invoke internal filters");
- mcd_dispatcher_context_ref (context, "CTXREF01");
- mcd_dispatcher_context_proceed (context);
+ if (_mcd_dispatch_operation_get_cancelled (context->operation))
+ {
+ GError error = { TP_ERROR, TP_ERROR_CANCELLED,
+ "Channel request cancelled" };
+
+ _mcd_dispatcher_context_abort (context, &error);
+ }
+ else if (_mcd_dispatch_operation_peek_channels (context->operation) == NULL)
+ {
+ DEBUG ("No channels left");
+ }
+ else
+ {
+ _mcd_dispatch_operation_run_clients (context->operation);
+ }
mcd_dispatcher_context_unref (context, "CTXREF11");
}
@@ -969,30 +980,6 @@ mcd_dispatcher_new (TpDBusDaemon *dbus_daemon, McdMaster *master)
}
static void
-mcd_dispatcher_context_proceed (McdDispatcherContext *context)
-{
- GError error = { TP_ERROR, 0, NULL };
-
- if (_mcd_dispatch_operation_get_cancelled (context->operation))
- {
- error.code = TP_ERROR_CANCELLED;
- error.message = "Channel request cancelled";
- _mcd_dispatcher_context_abort (context, &error);
- goto no_more;
- }
-
- if (_mcd_dispatch_operation_peek_channels (context->operation) == NULL)
- {
- DEBUG ("No channels left");
- goto no_more;
- }
-
-no_more: /* either no more filters, or no more channels */
- _mcd_dispatch_operation_run_clients (context->operation);
- mcd_dispatcher_context_unref (context, "CTXREF01");
-}
-
-static void
mcd_dispatcher_context_unref (McdDispatcherContext * context,
const gchar *tag)
{
More information about the telepathy-commits
mailing list