Gabble has this: > /* FIXME: the porter should do this for us. */ > wocky_porter_register_handler_from_anyone (priv->porter, > WOCKY_STANZA_TYPE_IQ, WOCKY_STANZA_SUB_TYPE_NONE, > WOCKY_PORTER_HANDLER_PRIORITY_MIN, > iq_unknown_cb, conn, NULL); iq_unknown_cb does this: > wocky_stanza_get_type_info (stanza, NULL, &subtype); > > switch (subtype) > { > case WOCKY_STANZA_SUB_TYPE_GET: > case WOCKY_STANZA_SUB_TYPE_SET: > _gabble_connection_send_iq_error (conn, stanza, > XMPP_ERROR_SERVICE_UNAVAILABLE, NULL); > return TRUE; > default: > break; > } > > return FALSE; The porter should do this for us instead of just not replying to IQs.
I began implementing this in Wocky, but hit weird test failures. The WIP patch is at <http://git.collabora.co.uk/?p=user/wjt/wocky.git;a=commitdiff;h=refs/heads/reply-to-unhandled-iqs>. From the commit message: XMPP Core requires that we reply to all IQs we receive. If no handler claims responsibility for an incoming IQ, the porter should send back a <service-unavailable/> error. (Currently, Gabble does this.) For reasons I don't pretend to fully understand, this currently doesn't work! The test this patch adds fails with: ERROR:../../tests/wocky-test-helper.c:233:wait_sched_close_cb: assertion failed (error == (wocky-xmpp-connection-error, 1)): Another receive operation is pending (g-io-error-quark, 20) And, worringly, /xmpp-porter/handler-stanza fails with an equally inexplicable assertion: ERROR:../../tests/wocky-test-helper.c:230:wait_sched_close_cb: assertion failed: (s == NULL) I think this may be related to bug 34308 which I found when writing a simple send-a-message example program…
It works!
I made Gabble use this: http://cgit.collabora.com/git/user/wjt/telepathy-gabble/log/?h=unhandled-iqs For reasons of laziness, this branch is atop the deloudmouthing stuff.
This looks good, conditional on the de-loudmouthing (which I started looking at and liked the look of so far, but then decided reviewing Jonny's spec stuff was probably higher-priority).
Yeah I can get behind both of these branches.
this has been in wocky (commit 43d93377f) for ages, and in Gabble since 0.15.4 (commit de0f8a21f8).
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.