powered by Jive Software

BOSH, Android, asmack

Hi, I’m back,

first of all I’ve looked into the BOSH branch (second try) to find out what happened their. Looks like the initial layout is a bit of a mess (not the layout but how it was created: not based on an svn copy, fresh checkin with changed directory layout and changed svn keywords -> all files changed (regarding location and content), no svn history).

However there are just a handfull of commits (which are quite heavy weighted), so I’ve cherry picked them into a smack/trunk clone. The resulting repository is temporary at github/rtreffer/smack (hint: can we get that into mainline??).

I’ve also rebased asmack on the bosh version of smack (yes, xmppconnection does still work), updated code is again on github/rtreffer/asmack.

Android-capable build (jar+source.zip) can be found on code.google.com.

There are still bugs to be found. I’ve already caught some of them, like several broken wait/notify interactions (hint: if (condition) { wait(ms); } does not work if 2 methods wait for 2 events. You should do while (condition && timeToWait > 0) { wait(timeToWait); timeToWait = targetTime - currentTime; }).

Feedback would be appreciated. You can also try to find me at FOSDEM.

Regards,

René

PS: Has anyone thought about a way to get rid of the big parser loop?

Hi Treffer,

first of all I’ve looked into the BOSH branch (second try) to find out what happened their. Looks like the initial layout is a bit of a mess (not the layout but how it was created: not based on an svn copy, fresh checkin with changed directory layout and changed svn keywords -> all files changed (regarding location and content), no svn history).
That’s not entirely true, I’ve used svn move and svn copy for the new layout and all history should be preserved. But I had to create first new directories for the maven layout and therefore some implementations don’t show the history for some directories (like our FishEye but svn log version 1.6.6 works fine for me). I don’t remember that I’ve the keywords…

If you have more experience with subversion, please give me some advice for the next time.

can we get that into mainline?
I would wait until the implementation supports the main features, like proxy and https support.

I’ve also rebased asmack on the bosh version of smack (yes, xmppconnection does still work), updated code is again on github/rtreffer/asmack.

Thanks for your work and testing

So I propably just had problems merging your code.

Btw, I’ve found a bug :slight_smile: Populating the roster calls RosterEntry.getGroups which in turns calles getRoster waiting for the Roster to be initialized, which is not gonna happen (till timeout).

Try this patch :slight_smile:

I’ve just fixed the annoying “can’t get my roster” bug. New versions are uploaded.

Sorry if I’d annoyed anyone with that bug.

I’ve also cleaned up the downloads on googlecode.

I tested your patch, and after I apply it, many unit test fails:

testDeleteAllRosterGroupEntries(org.jivesoftware.smack.RosterTest) testDeleteAllRosterEntries(org.jivesoftware.smack.RosterTest) testChangeGroupAndNameToUnfiledEntry(org.jivesoftware.smack.RosterTest) testAddEntryToNewGroup(org.jivesoftware.smack.RosterTest) testRenameRosterGroup(org.jivesoftware.smack.RosterTest)

maybe we have to look on it in more detail.

How about the dev chat tomorrow? I’ll try to attend it anyway.

And it’s still better to have a broken roster than no roster at all…

[EDIT]Oh, and thanks for fixing :-)[/EDIT]

Regards,

RT

Good finding, thanks! I’ve looked on this in more detail and created SMACK-290. Your patch initializes the currentGroupNames list with the new group names which are received from the roster result but the old groups are expected to update the new changes. So I wrote and applied the attached patch which doesn’t depend on the XMPPConnection#getRoster method.
fixRosterInit.patch.zip (483 Bytes)

Ah, right, that explains the broken tests, too :slight_smile:

Will revert & use your patch asap.

Regards,

RT