[Bug 24120] Refactor the McdDispatcher

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Oct 20 19:34:32 CEST 2009


http://bugs.freedesktop.org/show_bug.cgi?id=24120





--- Comment #27 from Will Thompson <will.thompson at collabora.co.uk>  2009-10-20 10:34:32 PST ---
dr4.5:

+    channels_array = _mcd_dispatch_operation_dup_channel_details
+        (context->operation);

Not putting the ( on the same line as the function name tricks cscope into not
realising this is a function call.  Not that big a deal I guess.

     context->operation = _mcd_dispatch_operation_new (priv->clients,
-        !requested, channels, (const gchar * const *) possible_handlers);
-    /* ownership of @channels is stolen, but the GObject references are not */
+        !requested, g_list_copy (channels),
+        (const gchar * const *) possible_handlers);
+    /* the copy of @channels is stolen, but the GObject references are not */

Would it be clearer to make _mcd_dispatch_operation_new() deep-copy the
channels?

+    /* if it was a channel request, and it was cancelled, then the whole
+     * context should be aborted */

This comment no longer makes sense inside MDO.

+        /* remove the context from the list of active contexts */
+        priv->operations = g_list_remove (priv->operations,
context->operation);
Comment doesn't match the implementation. I think the comment is more correct.

> McdDispatchOperation: emit ready-to-dispatch just after finished

Why after and not before?

It's slightly confusing that mcd_dispatcher_run_handlers() is both a signal
callback and a method called when running a handler fails, but I think I'll get
over it.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list