Bug 15769 - Calls made before caps discovery completes should wait for it
Summary: Calls made before caps discovery completes should wait for it
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-30 09:42 UTC by Simon McVittie
Modified: 2009-02-05 01:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Non-working patch to slightly improve this behaviour. (2.60 KB, patch)
2009-02-05 01:11 UTC, Will Thompson
Details | Splinter Review

Description Simon McVittie 2008-04-30 09:42:56 UTC
If we haven't yet discovered all of a user's capabilities, calls fail. This leads to some horrific hacks in NMC's RequestChannel implementation.

Calls made to a contact on the subscribe list whose capabilities we haven't fully worked out yet should instead be queued somehow, and either continue when we discover that they are capable of receiving calls, or fail when we discover they are not capable of receiving calls (or when some arbitrary timeout is reached).
Comment 1 Will Thompson 2009-02-05 01:10:36 UTC
This has been fixed for a while. If you call RequestStreams, and we don't know the contact's capable:

* If we know we're waiting for a disco response, we wait (indefinitely) for that.
* If we're still "unsure" we've got initial presences (also known as: we've been online at least 5 seconds), we wait 5 seconds and try again.
* Else, return with NotAvailable.

Ideally in the second case we'd wait 5 seconds, or until we get that contact's presence, whichever is the shorter. I thought that'd be easy to implement (by listening to presences-updated on the PresenceCache) but that signal is emitted just before the caps URI is processed and discos sent if necessary. I'm not sure if anything depends on that ordering, but it doesn't seem worth finding out. The reward isn't particularly compelling.
Comment 2 Will Thompson 2009-02-05 01:11:18 UTC
Created attachment 22596 [details] [review]
Non-working patch to slightly improve this behaviour.


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.