Reminder for David to fix it.
Hi! Is it related to the thing, I described in IRC 28th September. 2012-09-28 20:38:45 <mva> i've folowing problem with ktp: 2012-09-28 20:41:24 <mva> i've few machines on wireless network. ANd when some machine comes online in link-local xmpp (via salut), all already connected can see user in contact-lists, but this user can't see anybody. I've checked with dbus-monitor and it looks like all works fine on telepathy side, and eve on salut. And all users shows fine in dbus, but doesn't appears in ktp-contact list untill they relogin... 2012-09-28 20:41:29 <mva> any ideas? 2012-09-28 20:41:57 <mva> dbus-monitor --session log part, if any: http://ompldr.org/vZm5tZQ/paste.txt
Thanks. Could you describe what's happening whilst you were taking that log (sorry, I know it was a long time ago). There's two users on Local XMPP Lina and you? TelepathyQt has a folder called "Examples" in there is an example called "roster". This will be in your build dir, but not installed. If you could run this and say if the contacts appear, that would be really useful. If they do, then we know it's in our models, if not the problem probably lies inside TpQt (or lower)
1) can't remember right actions order, but it is 100% that roster on "note" was empty when Lina's presence was in dbus, and vice versa: empty roster on Lina's laptop when she came online and _received_ presence from "mva@note" in dbus. Anyway, here is new full (not cutted) log: http://ompldr.org/vZ2Q0Yg/paste.txt It starts when I'm offline, then I change status to Available. As you can see, it _is_ presences from Lina in dbus, but she is not in the roster. (And, just for test, I just restarted network connection on her laptop (which caused ktp-salut reconnection) and now I see her contact in my roster, while she can't see mine. So it still works in both sides). 2) yes. it is two users on the network. Both uses wireless connections, both use ktp. 3) http://ompldr.org/vZ2Q0bA/ktp_paste.txt (look at two comments at the end) But roster in ./roster's GUI windows is empty anyway.
It's a bug in TpQt The ContactManager never enters state ready. the ContactManager always remains in state -1, which isn't even a valid enum value for the ContactManager state. This is because when groupsroster fails, it never calls setStateSuccess The bug appears to be in: void ContactManager::Roster::gotContactListContacts(QDBusPendingCallWatcher *watcher) When running with a bit of debug: 846 if (introspectPendingOp) { is true 848 if (!groupsSetSuccess) { is false (as in groupsSetSuccess==true) (line numbers may be wrong due to added qDebug statements) So nothing will ever call setStateSuccess, it just stays in limbo. FWIW: groupsReintrospectionRequired is false. I'm not sure which path it's meant to go down. I "think" if you remove the "if (!groupsSetSuccess)" and always execute this code, everything will work. However I don't fully understand this code and don't want to edit it. (leave this bug open until a new bug is opened on freedesktop.org, and then close this one as upstream)
Created attachment 75549 [details] check for Contact::FeatureRosterGroups on ConnectionManager I've done some experimenting with local xmpp and also a jabber account to verify behaviour. It looks like the contact list groups are wrongfully assumed for local-xmpp if the features on the Connection are checked. The requestedFeatures on the connection contains a Connection::FeatureRosterGroups feature, leading to a situation where setStateSuccess() is never called, because in introspectGroups() the missing functionality is caught and short-circuited. My guess is it should check on the supported features of the ContactManager, not on the requested features of the Connection. I've created a patch, which makes local-xmpp behave as expected.
That patch itself is wrong, you're now getting the groups if they're available regardless of whether you requested them or not. However, you've clearly got the right idea for a fix. Change it to if (supported && requested) Brilliant, lets try and get this merged into TpQt.
bug @ freedesktop.org : https://bugs.freedesktop.org/show_bug.cgi?id=57739
Created attachment 75551 [details] also check for Contact::FeatureRosterGroups on ConnectionManager You mean like this?
I guess you can close this bug now, since it's now on freedesktop.org.. If you know an area that needs some attention, let me know. I'm new to this codebase and I've only looked through the code for a few hours, but I have some time on my hands the next few weeks..
Thanks! Closed as an upstream issue. Everyone interested please track the freedesktop bug: https://bugs.freedesktop.org/show_bug.cgi?id=57739