Summary: | Allow Gabble plugins to provide additional TpChannelManager implementations | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Will Thompson <will> |
Component: | gabble | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | enhancement | ||
Priority: | medium | CC: | jonny.lamb |
Version: | git master | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
URL: | http://cgit.freedesktop.org/~jonny/telepathy-gabble/log?h=plugin-channel-managers | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Will Thompson
2011-01-05 03:23:22 UTC
*** Bug 34247 has been marked as a duplicate of this bug. *** Review for Jonny's implementation of this: In gabble_plugin_loader_create_channel_managers: + +static void +copy_to_other_array (gpointer data, + gpointer user_data) +{ + g_ptr_array_add (user_data, data); +} ... + g_ptr_array_foreach (managers, copy_to_other_array, out); + g_ptr_array_free (managers, TRUE); ^^^^ In _gabble_connection_create_channel_managers: +static void +add_to_array (gpointer data, + gpointer user_data) +{ + g_ptr_array_add (user_data, data); +} + ... + g_ptr_array_foreach (tmp, add_to_array, channel_managers); + g_ptr_array_free (tmp, FALSE); ^^^^^ So you wrote this function twice, and one of your two implementations is buggy. This is a pretty compelling argument for writing gabble_ptr_array_append() or similar. + const gchar * const empty[] = { "omg", "hi mum!", NULL }; You have a new and interesting definition of empty. You didn't add checking for this stuff to tests/twisted/sidecars.py (or I guess to a new plugin — this isn't really to do with sidecars). > Question[1]: I've removed the assertion that all channel managers are also > GabbleCapsChannelManagers. Is this alright or shall we add this to the plugin > API too? I'd say it's fine for now. Sure, I think that's fine. (But yeah, we'll probably need this later.) I suppose theoretically we should probably have a way to add this stuff to <http://telepathy.freedesktop.org/spec/Protocol.html#Property:RequestableChannelClasses>, too... (In reply to comment #2) > So you wrote this function twice, and one of your two implementations is buggy. > This is a pretty compelling argument for writing gabble_ptr_array_append() or > similar. As I said in the salut bug, having such a helper function wouldn't actually help in this case (although see bug #34249). I've fixed the wrong one. > You have a new and interesting definition of empty. I do. Fixed. > You didn't add checking for this stuff to tests/twisted/sidecars.py (or I guess > to a new plugin — this isn't really to do with sidecars). Done. All pushed to my branch. CZECH IT OWWWWT. I added another patch to the branch to please Andre who was complaining that there was no way to get the WockySession. le finally done. |
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.