diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-05-07 11:04:32 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-05-07 15:33:37 +0200 |
commit | 8814084a755c495bf0682a2c91ab0db10a4efc84 (patch) | |
tree | c9332c6141e1d32126468e602136b326360b212a /telepathy-glib | |
parent | 357f52a4d7d76291670ee77e54f5fe15948b0883 (diff) | |
download | telepathy-glib-8814084a755c495bf0682a2c91ab0db10a4efc84.tar.gz |
get_dispatch_operation_prop_cb: invalidate the CDO is a property is missing
Diffstat (limited to 'telepathy-glib')
-rw-r--r-- | telepathy-glib/channel-dispatch-operation.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/telepathy-glib/channel-dispatch-operation.c b/telepathy-glib/channel-dispatch-operation.c index b7dcc0514..7bc483fab 100644 --- a/telepathy-glib/channel-dispatch-operation.c +++ b/telepathy-glib/channel-dispatch-operation.c @@ -490,6 +490,7 @@ get_dispatch_operation_prop_cb (TpProxy *proxy, gboolean prepared = TRUE; GPtrArray *channels; guint i; + GError *e = NULL; self->priv->preparing_core = FALSE; @@ -499,6 +500,7 @@ get_dispatch_operation_prop_cb (TpProxy *proxy, error->message); prepared = FALSE; + e = g_error_copy (error); goto out; } @@ -508,7 +510,10 @@ get_dispatch_operation_prop_cb (TpProxy *proxy, if (self->priv->connection == NULL) { - DEBUG ("Mandatory 'Connection' property is missing"); + e = g_error_new_literal (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + "Mandatory 'Connection' property is missing"); + DEBUG ("%s", e->message); + prepared = FALSE; goto out; } @@ -519,7 +524,10 @@ get_dispatch_operation_prop_cb (TpProxy *proxy, if (self->priv->account == NULL) { - DEBUG ("Mandatory 'Account' property is missing"); + e = g_error_new_literal (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + "Mandatory 'Account' property is missing"); + DEBUG ("%s", e->message); + prepared = FALSE; goto out; } @@ -530,7 +538,10 @@ get_dispatch_operation_prop_cb (TpProxy *proxy, if (self->priv->possible_handlers == NULL) { - DEBUG ("Mandatory 'PossibleHandlers' property is missing"); + e = g_error_new_literal (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + "Mandatory 'PossibleHandlers' property is missing"); + DEBUG ("%s", e->message); + prepared = FALSE; goto out; } @@ -543,7 +554,9 @@ get_dispatch_operation_prop_cb (TpProxy *proxy, TP_ARRAY_TYPE_CHANNEL_DETAILS_LIST); if (channels == NULL) { - DEBUG ("No Channels property"); + e = g_error_new_literal (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + "Mandatory 'Channels' property is missing"); + DEBUG ("%s", e->message); prepared = FALSE; goto out; @@ -582,6 +595,12 @@ get_dispatch_operation_prop_cb (TpProxy *proxy, out: _tp_proxy_set_feature_prepared (proxy, TP_CHANNEL_DISPATCH_OPERATION_FEATURE_CORE, prepared); + + if (!prepared) + { + tp_proxy_invalidate ((TpProxy *) self, e); + g_error_free (e); + } } static void |