[Bug 33911] Remove Loudmouth wrapper

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 31 16:22:03 CET 2012


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

--- Comment #16 from Will Thompson <will.thompson at collabora.co.uk> 2012-01-31 07:22:03 PST ---
(In reply to comment #14)
> Okay, well, I looked over this huge branch. I'm not going to claim it's the
> most thorough review ever but I trust your ability to run `make check`, and
> really, what's the worst that can happen. Only one question:
> 
> - else if (lm_message_get_sub_type (msg) != LM_MESSAGE_SUB_TYPE_RESULT)
> + else if (wocky_stanza_extract_errors (msg, NULL, NULL, NULL, NULL))
> 
> These two aren't really equal though, are they?

In general, no, but here they are. If you know that 'msg' is a reply to an IQ,
then you know that it either has type='result' or type='error'. So:

    wocky_stanza_extract_errors (msg, ...) returns TRUE
  ⇔
    lm_message_get_sub_type (msg) == LM_MESSAGE_SUB_TYPE_ERROR
  ⇔
    lm_message_get_sub_type (msg) != LM_MESSAGE_SUB_TYPE_RESULT

It's true that wocky_stanza_extract_errors() does a bit more rummaging around
in the stanza, even if all its out parameters are %NULL. I could make it
short-circuit… or add a wocky_stanza_is_error () maybe?

-- 
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