[Bug 40305] New: BypassObservers check is wrong

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Aug 23 14:11:32 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=40305

           Summary: BypassObservers check is wrong
           Product: Telepathy
           Version: git master
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: mission-control
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: simon.mcvittie at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org
                CC: xclaesse at gmail.com, will.thompson at collabora.co.uk
            Blocks: 30043


+++ This bug was initially created as a clone of Bug #40283 +++

> /* this is analogous to *_can_bypass_handlers() method above */

It's _can_bypass_approvers :-)

> static gboolean
> _mcd_dispatch_operation_handlers_can_bypass_observers (
>     McdDispatchOperation *self)
> {
[...]
>     for (iter = self->priv->possible_handlers;
>          iter != NULL && *iter != NULL;
>          iter++)
>     {
[...]
>             gboolean bypass = _mcd_client_proxy_get_bypass_observers (
>                 handler);
> 
>             DEBUG ("%s has BypassObservers=%c", *iter, bypass ? 'T' : 'F');
>             return bypass;

The corresponding code in _can_bypass_approvers explains why we short-circuit
in both cases:

>         /* If the best handler that still exists bypasses approval, then
>          * we're going to bypass approval.
>          *
>          * Also, because handlers are sorted with the best ones first, and
>          * handlers with BypassApproval are "better", we can be sure that if
>          * we've found a handler that still exists and does not bypass
>          * approval, no handler bypasses approval. */

However, the second sentence does not apply to BypassObservers - the value of
BypassObservers does not affect a Handler's "quality" score (although perhaps
it should - see Bug #30043).

So, it should only short-circuit in the TRUE case:

    gboolean bypass = [...];

    DEBUG (...);

    if (bypass)
      return TRUE;

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



More information about the telepathy-bugs mailing list