Re: Accepted presence subscription never signaled to the subscriber

2016-04-04 Thread Philipp Jacob
2016-04-01 19:17 GMT+02:00 Tomasz Sterna :

> W dniu 01.04.2016, pią o godzinie 15∶06 +0200, użytkownik Philipp Jacob
> napisał:
> >  > from='localhost' to='localhost'>
> >  > type='subscribed' to='gloox@localhost'/>
> > 
> > sx (io.c:301) encoding 210 bytes for writing: 
> Here we see a bug, as the from is not replaced with bare JID.
>
>
> > sx (io.c:255) decoded read data (210 bytes):
> >  > to='localhost' from='localhost'>
> >> type='subscribed' from='user1@localhost/testclient'/>
> > 
> > (io.c:96) completed nad: 
> And here this stanza arrives back at the 'localhost' sm, destined for
> gloox@.
>
> What hapens next with it?
>
> It should pass:
> mod_presence.c  _presence_pkt_user()  and get passed to pres_in()
> pres.c  pres_in()  and get duplicated to each gloox session
> pkt.c  pkt_sess()  each copy gets via router to gloox c2s connections
>
> Maybe post the rest of the debug log on some pastebin, or just create
> an issue on github[1] as we already found one bug. :-)
>
> [1] https://github.com/jabberd2/jabberd2/issues/new
>
>
> --
>  /o__  A verbal contract isn't worth the paper it's written on. Include
> (_<^'  me out. -Samuel Goldwyn
>
>
Ok, I created https://github.com/jabberd2/jabberd2/issues/116


Re: Accepted presence subscription never signaled to the subscriber

2016-04-01 Thread Tomasz Sterna
W dniu 01.04.2016, pią o godzinie 15∶06 +0200, użytkownik Philipp Jacob
napisał:
>  from='localhost' to='localhost'>
>  type='subscribed' to='gloox@localhost'/>
> 
> sx (io.c:301) encoding 210 bytes for writing:  sx (io.c:255) decoded read data (210 bytes):
>  to='localhost' from='localhost'>
>    type='subscribed' from='user1@localhost/testclient'/>
> 
> (io.c:96) completed nad: https://github.com/jabberd2/jabberd2/issues/new


-- 
 /o__  A verbal contract isn't worth the paper it's written on. Include
(_<^'  me out. -Samuel Goldwyn



signature.asc
Description: This is a digitally signed message part


Re: Accepted presence subscription never signaled to the subscriber

2016-04-01 Thread Philipp Jacob
2016-04-01 14:38 GMT+02:00 Tomasz Sterna :

> W dniu 01.04.2016, pią o godzinie 11∶04 +0200, użytkownik Philipp Jacob
> napisał:
> > In the router's debug output I can see the incoming subscribed
> > presence stanza from the contact:
> > sx (io.c:255) decoded read data (323 bytes):  > to='localhost'> > sc:sm='621b457a7181f454ca07bb4326e73e67096ed383' sc:c2s='10'
> > from='user1@localhost/testclient' type='subscribed'
> > to='gloox@localhost'/>
>
> I'm pretty sure the router routed it from 'c2s' to 'localhost' as
> requested.
>
> Take a look at sm debug log of 'localhost' to see what happened with
> that stanza there.
>
> According to RFC6121 3.1.5. server should:
> Replace from='user1@localhost/testclient' with from='user1@localhost';
> Then push roster item to all user1 (interested) resources;
> And finally send presence to gloox.
>
>
>
> --
>  /o__  "I always avoid prophesying beforehand because it is much better
> (_<^'  to prophesy after the event has already taken place. " - Winston
>
>
The final presence stanza arrives at gloox.
But not the 'subscribed' presence stanza with edited 'from' attribute.

The following messages are the only one mentioning "subscribed" in the sm
debug log during the process of requesting the subscription from
user1@localhost:

sx (io.c:255) decoded read data (323 bytes):



(io.c:96) completed nad: 


sx (io.c:301) encoding 210 bytes for writing: 
  

(io.c:96) completed nad: 

Re: Accepted presence subscription never signaled to the subscriber

2016-04-01 Thread Tomasz Sterna
W dniu 01.04.2016, pią o godzinie 11∶04 +0200, użytkownik Philipp Jacob
napisał:
> In the router's debug output I can see the incoming subscribed
> presence stanza from the contact:
> sx (io.c:255) decoded read data (323 bytes):  to='localhost'> sc:sm='621b457a7181f454ca07bb4326e73e67096ed383' sc:c2s='10'
> from='user1@localhost/testclient' type='subscribed'
> to='gloox@localhost'/>

I'm pretty sure the router routed it from 'c2s' to 'localhost' as
requested.

Take a look at sm debug log of 'localhost' to see what happened with
that stanza there.

According to RFC6121 3.1.5. server should:
Replace from='user1@localhost/testclient' with from='user1@localhost';
Then push roster item to all user1 (interested) resources;
And finally send presence to gloox.



-- 
 /o__  "I always avoid prophesying beforehand because it is much better
(_<^'  to prophesy after the event has already taken place. " - Winston