Bug 68149 - Erroneous warning if CM does not implement SimplePresence
Summary: Erroneous warning if CM does not implement SimplePresence
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2013-08-15 13:38 UTC by Xavier Claessens
Modified: 2013-10-02 13:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Xavier Claessens 2013-08-15 13:38:29 UTC
telepathy-idle does not implement SimplePresence, but when preparing TpContact objects it prints:

(lt-empathy:18345): tp-glib/contacts-WARNING **: tp_contact_set_attributes: /org/freedesktop/Telepathy/Connection/idle/irc/testman_40chat_2efreenode_2enet0x17a31c0 supposedly implements Contacts and SimplePresence, but omitted the mandatory org.freedesktop.Telepathy.Connection.Interface.SimplePresence/presence attribute

This is wrong, idle never claimed to implement SimplePresence. That warning is displayed if we WANT the presence but CM did not give it because it's not supported. There is a similar warning in the ALIAS case, but not in all other cases...
Comment 1 Xavier Claessens 2013-08-15 13:41:59 UTC
Relatedly, there are inconsistencies in the various contact_maybe_set_*() functions, some warn if the attr is NULL, others silently return without marking the feature as prepared, and finally some mark feature as ready but creates a dummy value.
Comment 2 Simon McVittie 2013-08-19 10:28:23 UTC
(In reply to comment #0)
> That warning
> is displayed if we WANT the presence but CM did not give it because it's not
> supported.

I thought we didn't even ask, for things not present in ContactAttributeInterfaces?
Comment 3 Simon McVittie 2013-10-02 10:52:21 UTC
(In reply to comment #2)
> I thought we didn't even ask, for things not present in
> ContactAttributeInterfaces?

We don't, but we don't remember what was present in ContactAttributeInterfaces so we can suppress the warning. Attachment #86918 [details] on Bug #70010 fixes this, so I'm tagging it as patch.
Comment 4 Simon McVittie 2013-10-02 10:54:43 UTC
(In reply to comment #1)
> Relatedly, there are inconsistencies in the various contact_maybe_set_*()
> functions, some warn if the attr is NULL, others silently return without
> marking the feature as prepared, and finally some mark feature as ready but
> creates a dummy value.

They have to be somewhat inconsistent. Some (Alias, SimplePresence) define that if supported and asked for, the attribute must not be omitted, usually because there's a sensible answer at all times (alias=identifier, presence=UNKNOWN). Some define omission to mean "don't know".

Whether to consider NULL/omission to be enough to prepare the feature is case-by-case. I'll check what the cases are / whether they're all sensible.
Comment 5 Simon McVittie 2013-10-02 13:56:30 UTC
Fixed in git for 0.23.0 (reviewed by Guillaume on Bug #70010).


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.