+++ This bug was initially created as a clone of Bug #30422 +++ tp_handle_channels_context_get_handler_info returns a dbus-glib GHashTable. We should have a version that returns a new ref to a G_VARIANT_TYPE_VARDICT.
Created attachment 94880 [details] [review] handle-channel-context: replace get_handler_info by a GVariant version
Created attachment 94881 [details] [review] test tp_handle_channel_context_dup_handler_info()
Created attachment 94882 [details] [review] handle-channel-context: store handler_info as a GVariant
Comment on attachment 94880 [details] [review] handle-channel-context: replace get_handler_info by a GVariant version Review of attachment 94880 [details] [review]: ----------------------------------------------------------------- ::: telepathy-glib/handle-channel-context.c @@ +690,3 @@ > { > g_return_val_if_fail (TP_IS_HANDLE_CHANNELS_CONTEXT (self), NULL); > + return tp_asv_to_vardict (self->handler_info); Contrary to Bug #55109, this relies for its correctness on tp_asv_to_vardict *not* returning a floating ref. Pick one :-)
Comment on attachment 94881 [details] [review] test tp_handle_channel_context_dup_handler_info() Review of attachment 94881 [details] [review]: ----------------------------------------------------------------- ++
(In reply to comment #4) > Comment on attachment 94880 [details] [review] [review] > handle-channel-context: replace get_handler_info by a GVariant version > > Review of attachment 94880 [details] [review] [review]: > ----------------------------------------------------------------- > > ::: telepathy-glib/handle-channel-context.c > @@ +690,3 @@ > > { > > g_return_val_if_fail (TP_IS_HANDLE_CHANNELS_CONTEXT (self), NULL); > > + return tp_asv_to_vardict (self->handler_info); > > Contrary to Bug #55109, this relies for its correctness on tp_asv_to_vardict > *not* returning a floating ref. Pick one :-) I rebased the branch on top of next where tp_asv_to_vardict() now returns a floating ref so it's now ok.
(In reply to comment #6) > > Contrary to Bug #55109, this relies for its correctness on tp_asv_to_vardict > > *not* returning a floating ref. Pick one :-) > > I rebased the branch on top of next where tp_asv_to_vardict() now returns a > floating ref so it's now ok. If this is now g_variant_ref_sink (tp_asv_to_vardict (self->handler_info)), ship it. Otherwise, no.
(In reply to comment #7) > (In reply to comment #6) > > > Contrary to Bug #55109, this relies for its correctness on tp_asv_to_vardict > > > *not* returning a floating ref. Pick one :-) > > > > I rebased the branch on top of next where tp_asv_to_vardict() now returns a > > floating ref so it's now ok. > > If this is now g_variant_ref_sink (tp_asv_to_vardict (self->handler_info)), > ship it. Otherwise, no. It is; 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.