Bug 38706 - initially connecting as invisible problematic since last week
Summary: initially connecting as invisible problematic since last week
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Marco Barisione
QA Contact: Telepathy bugs list
URL: http://cgit.collabora.com/git/user/ba...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-06-27 01:59 UTC by mehmet.giritli
Modified: 2011-08-01 09:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
gabble log (89.58 KB, text/plain)
2011-06-27 02:01 UTC, mehmet.giritli
Details

Description mehmet.giritli 2011-06-27 01:59:29 UTC
I have been using gabble with gtalk in invisible mode for a long time already. I never had any problems so far, except the beginning from the last week or so. When I try to connect as invisble, most of the time it gets into the busy state on its own. Manually changing it to invisible again works ok and stays that way. But the problem is there with the initial connection attempt as invisible.
Comment 1 mehmet.giritli 2011-06-27 02:01:55 UTC
Created attachment 48454 [details]
gabble log

Attached log file is taken after disconnecting gabble and then trying to reconnect as invisible with the result getting busy status and finally manually switching to invisible again successfully.
Comment 2 Will Thompson 2011-07-14 08:59:35 UTC
I took a quick look over the log:


gabble/connection-DEBUG: 27/06/11 11:58:22.703319: get_shared_status_async (conn-presence.c:1066):  
wocky-DEBUG: 27/06/11 11:58:22.703511: _write_node_tree: Serializing tree:
* iq xmlns='jabber:client' type='get' to='mehmet.giritli@googlemail.com' id='524836703456'
    * query xmlns='google:shared-status' version='2'

* iq xmlns='jabber:client' to='mehmet.giritli@googlemail.com/4a46a42c' from='mehmet.giritli@googlemail.com' id='524836703456' type='result'
    * query xmlns='google:shared-status' status-min-ver='3' status-max='512' status-list-max='3' status-list-contents-max='5'

status-min-ver=3! Gabble checks for exactly version '2' to determine whether to support invisibility. So then we set our own status, specifying status-min-ver='2', which causes the server to echo stuff back to us with that minimum version, at which point Gabble miraculously discovers that it can do invisibility after all.

I took a look at <http://code.google.com/apis/talk/jep_extensions/shared_status.html>, which makes no reference to version 3 (all examples are version 2). It says:

> Clients can use status-min-ver information to optionally display hints in the user interface when a user tries to select invisible mode while logged in with a client that does not support invisibility.

and:

> Allowed values are:
> true: User is invisible. Google Talk will not advertise presence for clients that support shared-status version 2 or higher.

So:

 (a) we could write to Google and be all like “hey what's new in version 3”
 (b) we could make Gabble check for version ≥ 2, and just assume that they won't have broken the protocol backwards-incompatibly…
Comment 3 mehmet.giritli 2011-07-18 00:43:45 UTC
(In reply to comment #2)

>  (b) we could make Gabble check for version ≥ 2, and just assume that they
> won't have broken the protocol backwards-incompatibly…

Could you share a patch for this option so that I can give it a test? I reckon it would be a simple patch to change this, right?
Comment 4 Marco Barisione 2011-07-26 04:14:05 UTC
(In reply to comment #2)
>  (a) we could write to Google and be all like “hey what's new in version 3”
>  (b) we could make Gabble check for version ≥ 2, and just assume that they
> won't have broken the protocol backwards-incompatibly…

These 2 options don't seem mutually exclusive to me.
Comment 5 Marco Barisione 2011-07-26 05:54:53 UTC
(In reply to comment #2)
>  (b) we could make Gabble check for version ≥ 2, and just assume that they
> won't have broken the protocol backwards-incompatibly…

This is wrong. The server gives us initially its version (if no other resource is connected), but then it switches to speak the most recent version supported by all the connected resources. If we get a version we don't understand it just means that the server and everybody else will have to speak the same version as ours.

I put a branch with a fix at http://cgit.collabora.com/git/user/bari/telepathy-gabble.git/log/?h=initial-invisibility
Comment 6 Marco Barisione 2011-07-26 05:58:06 UTC
I forgot to say that the branch is based on the stable 0.12 branch as it's a low risk fix to a regression.
Comment 7 Will Thompson 2011-07-28 07:50:50 UTC
The branch looks A-OK. Feel free to merge it to 0.12.
Comment 8 Marco Barisione 2011-08-01 09:39:21 UTC
Pushed to the stable branch and merged it to master.


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.