After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677457 - Should ignore invalidated channels
Should ignore invalidated channels
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: telepathy
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Shell Telepathy maintainer(s)
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-06-05 10:36 UTC by Guillaume Desmottes
Modified: 2012-06-18 07:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
telepathyClient: decline dispatch op when approving unsupported channel type (1.06 KB, patch)
2012-06-05 10:44 UTC, Guillaume Desmottes
accepted-commit_now Details | Review
telepathyClient: ignore invalidated channels (3.24 KB, patch)
2012-06-05 10:44 UTC, Guillaume Desmottes
needs-work Details | Review

Description Guillaume Desmottes 2012-06-05 10:36:40 UTC
During some tests I ended up with the same contact appearing twice in the bottom box. That's because of a race when observing invalidated channels.
Comment 1 Guillaume Desmottes 2012-06-05 10:44:15 UTC
Created attachment 215630 [details] [review]
telepathyClient: decline dispatch op when approving unsupported channel type

It shouldn't happen in theory but best to be safe than sorry.
Comment 2 Guillaume Desmottes 2012-06-05 10:44:25 UTC
Created attachment 215631 [details] [review]
telepathyClient: ignore invalidated channels

There is a race if a channel is invalidated during its preparation: the
'invalidated' signal is already emitted so the Shell will never notice.
We fix this by simply checking if the channel is already invalidated when
receiving it from telepathy-glib.

In the approving case, we reject the full ChannelDispatchOperation as we only
support approving one channel at the time.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-06-18 07:56:50 UTC
Review of attachment 215631 [details] [review]:

Minor whitespace issuse. Otherwise looks fine. Note that GErrors will be handled in gjs as a return value quite soon. Also note that returning GError*'s isn't really a standard API at all and maybe you should reconsider.

::: js/ui/telepathyClient.js
@@ +133,3 @@
             let [targetHandle, targetHandleType] = channel.get_handle();
 
+            if (Shell.is_channel_invalidated (channel))

Whitespace issues.
Comment 4 Guillaume Desmottes 2012-06-18 07:57:07 UTC
Attachment 215630 [details] pushed as e112fa9 - telepathyClient: decline dispatch op when approving unsupported channel type
Attachment 215631 [details] pushed as ededba0 - telepathyClient: ignore invalidated channels
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-06-18 07:57:09 UTC
Review of attachment 215630 [details] [review]:

Sure, why not.