I noticed today that the userlist in #telepathy was incomplete. From looking at the protocol logs, it looks like the list of members arrives in two batches, and Idle only exposes the first batch in the Telepathy API. I don't have the logs because I closed the terminal by accident and I'm going home. :)
This is because Freenode sends more than 512 characters in a single line, and the Idle parser … splits up such messages and tries to parse the subsequent chunks as stand-alone messages … which cannot possibly work. :) Test case coming up. I think the fix is for Idle to just malloc a buffer big enough to hold the message, and damn the consequences.
I'm now not 100% sure that this was Freenode's fault: I can't reproduce it sending lines longer than 512 bytes. I've got a branch that replaces the buffering code with some code that doesn't care about line lengths and also is less convoluted: <http://cgit.collabora.co.uk/git/user/wjt/telepathy-idle-wjt.git/log/?h=handle-massive-lines> But I'm not really sure it's okay: I won't be comfortable merging it until I know for sure what was causing the issue before, that there's a C unit test to test the parser in a variety of ways, and so on.
For some reason I am unable to reproduce with Freenode right now. I tried #fedora-devel and #telepathy.
So I've just updated this branch. A coworker (who I believe was using Idle) lost a message which I (using irssi, luddite that I am) saw truncated. I suspect it's to do with the input-splitting code just dropping over-long lines, which this branch does fix.
Ah, I think this code might break if it happens to get a chunk of data which ends with '\r' and then another chunk which starts with '\n'. Pesky code.
Will, do you still have a copy of this branch somewhere?
This updated URL should spring to life next time the cron job runs on Annarchy.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-idle/issues/28.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.