Not logged in. · Lost password · Register
Forum: MatriX RSS
Possible Recursive Bug after Publishing
Jro #1
Member since Feb 2010 · 27 posts
Group memberships: Members
Show profile · Link to this post
Subject: Pubsub - DiscoPubNodeResult in MiniClient
In my test case, I have the root node and a first level leaf.  The miniclient behaves as expected after this.  Once I publish to this node however, the DiscoPubSubNodes / DiscoPubSubNodesResult interaction gets stuck in a recursive loop.  The recursive XML is as follows:

  1. SEND: <iq id="MX_9" type="get" to="pubsub.folka" xmlns="jabber:client">
  2.  <query xmlns="" />
  3. </iq>
  5. RECV: <iq type="result" id="MX_9" from="pubsub.folka" to="jro@folka/MatriX" xmlns="jabber:client">
  6.  <query xmlns="">
  7.     <item jid="pubsub.folka" node="/clean_test1" />
  8.  </query>
  9. </iq>
  11. SEND: <iq id="MX_10" type="get" to="pubsub.folka" xmlns="jabber:client">
  12.  <query node="/clean_test1" xmlns="" />
  13. </iq>
  15. RECV: <iq type="result" id="MX_10" from="pubsub.folka" to="jro@folka/MatriX" xmlns="jabber:client">
  16.  <query xmlns="" node="/clean_test1">
  17.     <item jid="pubsub.folka" name="bnd81g37d61f49fgn581" />
  18.  </query>
  19. </iq>

... and keeps going infinitely (locking the client up etc etc)..

Tracing through the code, it looks like what happens is that DiscoPubSubNodes gets called on items that are mistaken as nodes, when they are not.  This is due to item.Node being null on 102 in FrmPubSub.cs. 

Am I correct on this?  It appears the valid solution should simply be doing a check to make sure item.Node isn't null before executing the code within the foreach loop.  Is there a different way the DiscoverItems call in the Discovery Manager should be used in order to avoid this or a different intended manner?  This was all done using Openfire 3.7.0 as well as Ejabberd.
This post was edited on 2014-07-30, 17:51 by Alex.
Alex #2
Member since Feb 2003 · 4388 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
thats right. In your case you get the published items and no more leaf nodes.

Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS