[ejabberd] pushing rosteritems to "own" resource

Badlop badlop at gmail.com
Wed Aug 26 14:17:43 MSD 2009


2009/8/24 Stephan Maihöfer <sma at turtle-entertainment.de>:
> i am encountering different behaviours for ejabberds
> roster-push after altering rosteritems (renaming for example).
>
> both servers are ejabberd-2.1.0-alpha but behave differently

Saying "ejabberd-2.1.0-alpha" is like saying "Linux 2.6.*".

That version number is not specific enough because it includes
many different code changes; it spans
from trunk r1361 (June 2008)
to trunk r2531 (August 2009).

Check what SVN version is running the problematic server.


> somehow. the one server pushes the item to the resource
> that initiated the change, on the other server there is only
> the result sent, nothing else.
>
> is this intended behaviour? it seems that the standard says
> "push to ALL connected resources". did i read that wrong?
> where in the code did that change (if at all).

I can't reproduce the problem.
Tested with ejabberd trunk SVN r2531, Erlang/OTP R13B01 and Tkabber SVN.

Two accounts: test1 at localhost and test2 at localhost
test1 has the other as contact, subscription both.
test1 has two connected sessions, with resources: sessionA and sessionB


test1 at localhost/sessionA sends to the server:

<iq xml:lang='es'
	type='set'>
  <query xmlns='jabber:iq:roster'>
    <item jid='test2 at localhost'
	name='Mr. Test 222222'/>
  </query>
</iq>

And receives the response:
<iq from='test1 at localhost'
	to='test1 at localhost/sessionA'
	type='result'/>

It also receives at the same time:
<iq from='test1 at localhost'
	to='test1 at localhost/sessionA'
	id='push4220851766'
	type='set'>
  <query xmlns='jabber:iq:roster'>
    <item subscription='both'
	name='Mr. Test 222222'
	jid='test2 at localhost'/>
  </query>
</iq>

So the client sends the response:
<iq id='push4220851766'
	xml:lang='es'
	type='result'
	to='test1 at localhost'>
  <query xmlns='jabber:iq:roster'/>
</iq>


Regarding the other session, the client receives the roster push:
<iq from='test1 at localhost'
	to='test1 at localhost/sessionB'
	id='push44911153'
	type='set'>
  <query xmlns='jabber:iq:roster'>
    <item subscription='both'
	name='Mr. Test 222222'
	jid='test2 at localhost'/>
  </query>
</iq>

And sends the corresponding response:
<iq id='push44911153'
	xml:lang='es'
	type='result'
	to='test1 at localhost'>
  <query xmlns='jabber:iq:roster'/>
</iq>


---


More information about the ejabberd mailing list