Bug 21796 - get_contact_statuses should not be allowed to fail
Summary: get_contact_statuses should not be allowed to fail
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://cgit.collabora.com/git/user/xc...
Whiteboard:
Keywords: patch
Depends on:
Blocks: tp-glib-1.0
  Show dependency treegraph
 
Reported: 2009-05-18 07:03 UTC by Will Thompson
Modified: 2012-09-06 11:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
TpPresenceMixinGetContactStatusesFunc: remove the GError argument (5.55 KB, patch)
2012-07-11 14:18 UTC, Xavier Claessens
Details | Splinter Review

Description Will Thompson 2009-05-18 07:03:50 UTC
The Presence mixin's get_contact_statuses callback can raise a GError, but there's no real reason for it to do so, particularly now we have "unknown". We should deprecate raising an error; first, we need to make all code calling it first validate the handles.
Comment 1 Xavier Claessens 2012-07-11 14:18:12 UTC
Created attachment 64110 [details] [review]
TpPresenceMixinGetContactStatusesFunc: remove the GError argument

It is useless since handles are already guaranteed to be valid.
Comment 2 Will Thompson 2012-07-11 14:35:30 UTC
Comment on attachment 64110 [details] [review]
TpPresenceMixinGetContactStatusesFunc: remove the GError argument

Review of attachment 64110 [details] [review]:
-----------------------------------------------------------------

::: telepathy-glib/presence-mixin.c
@@ +976,2 @@
>  
> +  g_hash_table_iter_init (&iter, contact_statuses);

tp-glib should still check whether contact_statuses is NULL, rather than just crashing if the CM returns NULL. (Maybe it should fill in "unknown" for all handles if the CM returns NULL? Or just leave it out of the attribute dictionary.)
Comment 3 Xavier Claessens 2012-09-06 10:54:52 UTC
Branch updated
Comment 4 Simon McVittie 2012-09-06 11:20:34 UTC
Looks fine for next.
Comment 5 Xavier Claessens 2012-09-06 11:31:18 UTC
Thanks, merged.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.