diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-05-04 15:26:45 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-05-05 14:39:10 +0200 |
commit | 12c77955be313d4f285b488313f2291075ee1505 (patch) | |
tree | bd1c9ea97192d5062b25a809b00d433a59062efd /telepathy-glib | |
parent | de8447ea9cf1fd36f9a8781522a2ef3524366d9a (diff) | |
download | telepathy-glib-12c77955be313d4f285b488313f2291075ee1505.tar.gz |
Don't fail preparing the context if the connection or account is not prepared
Diffstat (limited to 'telepathy-glib')
-rw-r--r-- | telepathy-glib/base-client.c | 3 | ||||
-rw-r--r-- | telepathy-glib/observe-channels-context.c | 17 | ||||
-rw-r--r-- | telepathy-glib/simple-observer.c | 3 |
3 files changed, 4 insertions, 19 deletions
diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c index 790f050d1..7ebf6c30c 100644 --- a/telepathy-glib/base-client.c +++ b/telepathy-glib/base-client.c @@ -50,8 +50,9 @@ /** * TpBaseClientClassObserveChannelsImpl: * @client: a #TpBaseClient instance - * @account: a #TpAccount having %TP_ACCOUNT_FEATURE_CORE prepared + * @account: a #TpAccount having %TP_ACCOUNT_FEATURE_CORE prepared if possible * @connection: a #TpConnection having %TP_CONNECTION_FEATURE_CORE prepared + * if possible * @channels: (element-type TelepathyGLib.Channel): a #GList of #TpChannel, * all having %TP_CHANNEL_FEATURE_CORE prepared if possible * @dispatch_operation: (allow-none): a #TpChannelDispatchOperation or %NULL; diff --git a/telepathy-glib/observe-channels-context.c b/telepathy-glib/observe-channels-context.c index e870d2732..82ed58879 100644 --- a/telepathy-glib/observe-channels-context.c +++ b/telepathy-glib/observe-channels-context.c @@ -529,19 +529,6 @@ context_check_prepare (TpObserveChannelsContext *self) } static void -failed_to_prepare (TpObserveChannelsContext *self, - const GError *error) -{ - g_return_if_fail (self->priv->result != NULL); - - g_simple_async_result_set_from_error (self->priv->result, error); - g_simple_async_result_complete (self->priv->result); - - g_object_unref (self->priv->result); - self->priv->result = NULL; -} - -static void account_prepare_cb (GObject *source, GAsyncResult *result, gpointer user_data) @@ -555,9 +542,7 @@ account_prepare_cb (GObject *source, if (!tp_proxy_prepare_finish (source, result, &error)) { DEBUG ("Failed to prepare account: %s", error->message); - failed_to_prepare (self, error); g_error_free (error); - goto out; } self->priv->num_pending--; @@ -581,9 +566,7 @@ conn_prepare_cb (GObject *source, if (!tp_proxy_prepare_finish (source, result, &error)) { DEBUG ("Failed to prepare connection: %s", error->message); - failed_to_prepare (self, error); g_error_free (error); - goto out; } self->priv->num_pending--; diff --git a/telepathy-glib/simple-observer.c b/telepathy-glib/simple-observer.c index adbfc032f..d9361165f 100644 --- a/telepathy-glib/simple-observer.c +++ b/telepathy-glib/simple-observer.c @@ -77,8 +77,9 @@ /** * TpSimpleObserverObserveChannelsImpl: * @self: a #TpSimpleObserver instance - * @account: a #TpAccount having %TP_ACCOUNT_FEATURE_CORE prepared + * @account: a #TpAccount having %TP_ACCOUNT_FEATURE_CORE prepared if possible * @connection: a #TpConnection having %TP_CONNECTION_FEATURE_CORE prepared + * if possible * @channels: (element-type TelepathyGLib.Channel): a #GList of #TpChannel, * all having %TP_CHANNEL_FEATURE_CORE prepared if possible * @dispatch_operation: (allow-none): a #TpChannelDispatchOperation or %NULL; |