5.2.23
09/22/2023

[#196] DiscoNodeHandler
Summary DiscoNodeHandler
Queue gloox
Queue Version 1.0
Type Bug
State Accepted
Priority 2. Medium
Owners js (at) camaya (dot) net
Requester liuch (at) mail (dot) ru
Created 04/24/2012 (4168 days ago)
Due
Updated 04/26/2012 (4166 days ago)
Assigned
Resolved

History
04/26/2012 08:32:16 PM liuch (at) mail (dot) ru Comment #5 Reply to this comment
Another question:
If I do not use on gloox::DiscoNodeHandler and 
gloox::AdhocCommandProvider, then why can not I get the appropriate 
STANZA through gloox :: IqHandler?
I'm comfortable in my program to respond to the request asynchronously.
04/26/2012 07:32:12 PM liuch (at) mail (dot) ru Comment #4 Reply to this comment
Could you please check if the attached patch solves the problem?
my code:
myClient->disco()->registerNodeHandler(rootDiscoHandler_, "");

I send:

<iq type="get" to="xxxxx" id="ac4da">
<query xmlns="http://jabber.org/protocol/disco#info"/>
</iq>


<iq type="get" to="xxxxx" id="ac4ea">
<query xmlns="http://jabber.org/protocol/disco#items"/>
</iq>

I received:

<iq from="xxxxx" type="result" xml:lang="en" to="liuch@jabber.ru/rs04
id="yyyyy">
<query xmlns="http://jabber.org/protocol/disco#info">
<identity category="client" type="bot"/>
<feature var="http://jabber.org/protocol/commands"/>
<feature var="http://jabber.org/protocol/disco#info"/>
<feature var="http://jabber.org/protocol/disco#items"/>
<feature var="jabber:iq:version"/>
<feature var="urn:xmpp:ping"/>
<feature var="vcard-temp"/>
</query>
</iq>

<iq from="xxxxx" type="result" xml:lang="en" to="yyyyy" id="ac4ea">
<query xmlns="http://jabber.org/protocol/disco#items">
<item node="http://jabber.org/protocol/commands" name="Ad-Hoc 
Commands" jid="zzzzz"/>
</query>
</iq>

Was called by only handleDiscoNodeItems. My handler was returned to an 
empty list, but as you can see, STANZA it is not.

p.s. Sorry for my english :)
04/26/2012 06:25:04 PM liuch (at) mail (dot) ru Comment #3 Reply to this comment
Thanks for the report.
Could you please check if the attached patch solves the problem?
Cursorily looked at the patch, but now I see that the patch only 
applies to ExtDiscoItems, but does not correct the situation with 
ExtDiscoInfo. Am I right?

Later I'll check the patch.

Thank you.
04/25/2012 01:54:43 PM Jakob Schröter Comment #2
New Attachment: discorootnode.diff
State ⇒ Accepted
Assigned to Jakob Schröter
Reply to this comment
Thanks for the report.
Could you please check if the attached patch solves the problem?
04/24/2012 01:49:21 AM liuch (at) mail (dot) ru Comment #1
State ⇒ Unconfirmed
Queue ⇒ gloox
Summary ⇒ DiscoNodeHandler
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
A quote from the documentation:
void registerNodeHandler        (DiscoNodeHandler *nh, const std::string &node)
...
node The node name to associate with this handler. Use an empty 
string to register for the root node.
But really can not get a request to the root element.
I looked method bool Disco::handleIq( const IQ& iq )
In the case of an empty node works the other piece of code.

I look forward to answering.