[Bug 38577] New: Can't register handlers for stanzas of any type
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jun 22 20:38:33 CEST 2011
https://bugs.freedesktop.org/show_bug.cgi?id=38577
Summary: Can't register handlers for stanzas of any type
Product: Wocky
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: General
AssignedTo: telepathy-bugs at lists.freedesktop.org
ReportedBy: will.thompson at collabora.co.uk
QAContact: telepathy-bugs at lists.freedesktop.org
Blocks: 38568
So I wrote an XML console, and I quickly looked at adding a signal for incoming
stanzas. According to Wocky's docs:
* wocky_porter_register_handler_from_anyone:
* @self: A #WockyPorter instance (passed to @callback).
* @type: The type of stanza to be handled, or WOCKY_STANZA_TYPE_NONE to match
* any type of stanza.
But you can't actually pass WOCKY_STANZA_TYPE_NONE, because the implementation
winds up calling wocky_stanza_new_with_sub_type() which calls check_sub_type()
which asserts that type != NONE for obvious reasons: the type name is the name
of the root element, so of course it needs a non-NONE one.
I suspect that the porter ought really to special-case NONE, and assert in
itself that sub_type is also NONE and that the varargs are empty, and not build
a stanza at all.
--
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