diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-11-05 16:52:11 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-11-05 16:52:11 +0000 |
commit | 59ed8b6e637780e0cc2e51ece03fc903aedf2d62 (patch) | |
tree | 17645cad408502f0a89a693cb6d8ba216716085e | |
parent | 04e1995f37fbdc48cab3e46e5dc163c1e4dcc171 (diff) |
gabble_vcard_manager_request: disallow calling when unconnected
All of its callers in Gabble 0.10 now check appropriately.
-rw-r--r-- | src/vcard-manager.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vcard-manager.c b/src/vcard-manager.c index 4e8c5bfa5..79f897f59 100644 --- a/src/vcard-manager.c +++ b/src/vcard-manager.c @@ -1539,6 +1539,8 @@ request_send (GabbleVCardManagerRequest *request, guint timeout) * * FIXME: the timeout is not always obeyed when there is already a request * on the same handle. It should perhaps be removed. + * + * The connection must be connected. */ GabbleVCardManagerRequest * gabble_vcard_manager_request (GabbleVCardManager *self, @@ -1555,6 +1557,8 @@ gabble_vcard_manager_request (GabbleVCardManager *self, GabbleVCardManagerRequest *request; GabbleVCardCacheEntry *entry = cache_entry_get (self, handle); + g_return_val_if_fail (connection->status == TP_CONNECTION_STATUS_CONNECTED, + NULL); g_return_val_if_fail (tp_handle_is_valid (contact_repo, handle, NULL), NULL); g_assert (entry->vcard_node == NULL); |