SID getting over ridden...

19 views
Skip to first unread message

pparks

unread,
Mar 28, 2013, 9:48:43 PM3/28/13
to sleekxmpp-...@googlegroups.com

I have an open IBB stream with a device and I send it some important information via this IBB stream. Based on this important information the device opens another IBB stream to me, at which point I now have two IBB streams open, but what I'm seeing is the sleekxmpp library sid gets set to the new session sid and I have a dangling IBB session. Thus when I try to close what I think is my original IBB stream with the device it fails (Note: the device has already closed that IBB stream). Since I'm trying to close a IBB stream with the wrong sid then it fails and I'm left with my original session still open. Is this a know thing or am I handling this scenario incorrectly?




Lance Stout

unread,
Mar 28, 2013, 10:25:23 PM3/28/13
to sleekxmpp-...@googlegroups.com
> I have an open IBB stream with a device and I send it some important information via this IBB stream. Based on this important information the device opens another IBB stream to me, at which point I now have two IBB streams open, but what I'm seeing is the sleekxmpp library sid gets set to the new session sid and I have a dangling IBB session.

Thanks for the report! I'll take a look into the sid overriding issue.

I'm curious though why you're starting two IBB streams in this case. A single IBB stream is already bi-directional, so you probably don't need to set up a second one.

-- Lance

pparks

unread,
Mar 28, 2013, 10:35:56 PM3/28/13
to sleekxmpp-...@googlegroups.com
Lance,

I'm going to ask the guy who's working on the device that question as well. That was my thought as well, but no matter the case I hope we can make SleepXMPP support his device's odd behavior. I can't imagine this is the first time this has come-up.

Pete

pparks

unread,
Mar 29, 2013, 2:25:57 PM3/29/13
to sleekxmpp-...@googlegroups.com
Lance,

Talked to him this morning and he says that the way it is. It treats IBB sessions like they are sockets. So I need a way of handling two separate sessions. Do you have any recommendation or sample code that show how you expect this to be handled. PS - sorry for the typo on the library name in my last message.

Pete

Lance Stout

unread,
Mar 29, 2013, 4:20:42 PM3/29/13
to sleekxmpp-...@googlegroups.com
> Talked to him this morning and he says that the way it is. It treats IBB sessions like they are sockets. So I need a way of handling two separate sessions.

Makes sense.

> Do you have any recommendation or sample code that show how you expect this to be handled. PS - sorry for the typo on the library name in my last message.

The expected way would be for it to just work the way you've been trying. Which, as a quick sanity check - the sid for the initial stream and the second one really are different, correct?


There also happens to be a branch 'si_file_transfer' which revamps the IBB plugin with some features needed to make file transfer work reliably. That might already solve your issue, so give it a try.

-- Lance

pparks

unread,
Mar 29, 2013, 7:06:12 PM3/29/13
to sleekxmpp-...@googlegroups.com


On Friday, March 29, 2013 1:20:42 PM UTC-7, Lance Stout wrote:
> Talked to him this morning and he says that the way it is. It treats IBB sessions like they are sockets. So I need a way of handling two separate sessions.

Makes sense.

> Do you have any recommendation or sample code that show how you expect this to be handled. PS - sorry for the typo on the library name in my last message.

The expected way would be for it to just work the way you've been trying. Which, as a quick sanity check - the sid for the initial stream and the second one really are different, correct?

Yes they are different id's and I lose track of my IBB stream thus it's dangling on the device. So I'm thinking I need to keep track of my idea when it initialized and be able to swap on the fly to the IBB Stream I create so I can close it. How can that be done programmatically? 


There also happens to be a branch 'si_file_transfer' which revamps the IBB plugin with some features needed to make file transfer work reliably. That might already solve your issue, so give it a try.

I'll let you know how it goes, but I'm gone all next week on vacation so it might be a while.

Thanks again. 

-- Lance

pparks

unread,
Apr 2, 2013, 11:52:00 AM4/2/13
to sleekxmpp-...@googlegroups.com
Does this fix the issue of the IBB sid getting overridden when the target opens an additional IBB session back to the initiator?

Tran Hung

unread,
Apr 4, 2013, 3:01:47 AM4/4/13
to sleekxmpp-...@googlegroups.com


Vào 08:48:43 UTC+7 Thứ sáu, ngày 29 tháng ba năm 2013, pparks đã viết:
Reply all
Reply to author
Forward
0 new messages