Bug 23703 - Race between tube SI and capabilities
Summary: Race between tube SI and capabilities
Status: NEW
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: 2009-09-04 04:24 UTC by Alban Crequy
Modified: 2009-09-04 04:26 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alban Crequy 2009-09-04 04:24:46 UTC
I think George's problems on Gabble tubes are this race: scenario: contact1 offers a tube to contact2:
      - contact2 connects
      - contact2 ask contact1's caps
      - contact1 receives contact2's presence
      - contact1 offer a tube to contact2
      - contact2 accept the tube
      - local application on contact2 computer connects on the tube
      - contact2 still didn't received caps from contact1
      - contact2 is looking for the right resource on contact1 to send bytestream initiation, which is the resource which has the tube capabilities (maybe it should just be the resource which offered the tube)
      - contact2 is confused: no tube capabilities on contact1's resources
      - contact2 closes the tube
      - contact2 receives contact1's caps, eventually

This is in src/tube-stream.c start_stream_initiation() line 514.

Possible solution:
1. either delay accepting the tube when we don't have the caps from the offerer (weird solution to me)
2. or remember the resource which offered the tube and send SI to that resource

The second solution looks better to me because even if the caps are received instantly everywhere, I think the tube code is wrong: we should not send the SI to *any* resource which has the right caps but to the resource which offer the tube. If contact1 has several gabble running on different computers with different resources (all with the tube caps), it will randomly work/don't work with the current implementation, depending which resource it chooses.
Comment 1 Alban Crequy 2009-09-04 04:26:11 UTC
Daf suggests that the scenario with different resources can be added in the unit tests.


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.