[Telepathy-commits] [telepathy-mission-control/master] Call AddRequest after returning from the D_Bus method
Alberto Mardegan
alberto.mardegan at nokia.com
Thu Feb 5 01:37:17 PST 2009
---
src/mcd-account-requests.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/mcd-account-requests.c b/src/mcd-account-requests.c
index 59857ef..40546fa 100644
--- a/src/mcd-account-requests.c
+++ b/src/mcd-account-requests.c
@@ -150,7 +150,6 @@ create_request (McdAccount *account, GHashTable *properties,
McdChannel *channel;
GError *error = NULL;
GHashTable *props;
- McdDispatcher *dispatcher;
/* We MUST deep-copy the hash-table, as we don't know how dbus-glib will
* free it */
@@ -165,9 +164,6 @@ create_request (McdAccount *account, GHashTable *properties,
g_signal_connect_after (channel, "status-changed",
G_CALLBACK (on_channel_status_changed), account);
- dispatcher = mcd_master_get_dispatcher (mcd_master_get_default ());
- _mcd_dispatcher_add_request (dispatcher, account, channel);
-
_mcd_account_online_request (account, online_request_cb, channel, &error);
if (error)
{
@@ -200,6 +196,7 @@ account_request_create (McSvcAccountInterfaceChannelRequests *self,
GError *error = NULL;
const gchar *request_id;
McdChannel *channel;
+ McdDispatcher *dispatcher;
channel = create_request (MCD_ACCOUNT (self), properties, user_time,
preferred_handler, FALSE);
@@ -213,6 +210,9 @@ account_request_create (McSvcAccountInterfaceChannelRequests *self,
g_debug ("%s: returning %s", G_STRFUNC, request_id);
mc_svc_account_interface_channelrequests_return_from_create (context,
request_id);
+
+ dispatcher = mcd_master_get_dispatcher (mcd_master_get_default ());
+ _mcd_dispatcher_add_request (dispatcher, MCD_ACCOUNT (self), channel);
}
static void
@@ -224,6 +224,7 @@ account_request_ensure_channel (McSvcAccountInterfaceChannelRequests *self,
GError *error = NULL;
const gchar *request_id;
McdChannel *channel;
+ McdDispatcher *dispatcher;
channel = create_request (MCD_ACCOUNT (self), properties, user_time,
preferred_handler, TRUE);
@@ -238,6 +239,9 @@ account_request_ensure_channel (McSvcAccountInterfaceChannelRequests *self,
g_debug ("%s: returning %s", G_STRFUNC, request_id);
mc_svc_account_interface_channelrequests_return_from_ensure_channel
(context, request_id);
+
+ dispatcher = mcd_master_get_dispatcher (mcd_master_get_default ());
+ _mcd_dispatcher_add_request (dispatcher, MCD_ACCOUNT (self), channel);
}
static void
--
1.5.6.5
More information about the telepathy-commits
mailing list