[Telepathy-commits] [telepathy-mission-control/master] Add the account to the context
Alberto Mardegan
alberto.mardegan at nokia.com
Thu Jan 29 06:55:52 PST 2009
It might not be available later, if the channels are aborted.
---
src/mcd-dispatcher.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index afc12fe..443e8e4 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -74,6 +74,7 @@ struct _McdDispatcherContext
GList *channels;
McdChannel *main_channel;
+ McdAccount *account;
McdDispatchOperation *operation;
/* This variable is the count of locks that must be removed before handlers
@@ -1626,12 +1627,20 @@ _mcd_dispatcher_enter_state_machine (McdDispatcher *dispatcher,
McdDispatcherPrivate *priv;
GList *chain, *list;
McdChannel *channel;
+ McdAccount *account;
guint n_channels;
g_return_if_fail (MCD_IS_DISPATCHER (dispatcher));
g_return_if_fail (channels != NULL);
g_return_if_fail (MCD_IS_CHANNEL (channels->data));
+ account = mcd_channel_get_account (channels->data);
+ if (G_UNLIKELY (!account))
+ {
+ g_warning ("%s called with no account", G_STRFUNC);
+ return;
+ }
+
priv = dispatcher->priv;
/* old-style filters cannot probably handle more than one channel; so,
@@ -1667,6 +1676,7 @@ _mcd_dispatcher_enter_state_machine (McdDispatcher *dispatcher,
context = g_new0 (McdDispatcherContext, 1);
context->ref_count = 1;
context->dispatcher = dispatcher;
+ context->account = account;
context->channels = channels;
context->chain = chain;
if (!requested)
--
1.5.6.5
More information about the telepathy-commits
mailing list