[Bug 26752] Setting a not supported presence state to a telepathy account does not deliver any failing feedback

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 29 18:01:57 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=26752

--- Comment #8 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-04-29 09:01:56 PDT ---
(In reply to comment #7)
> That is it. I chose to do it this way as we signal ChangingPresence really when
> the presence is changing, not when we asked for it. So if we are offline and
> someones asks to change the presence to Foo, we will first attempt to connect,
> then change change the presence. 

That doesn't sound right. Conceptually, we're already "trying to change the
presence" as soon as Set() is called.

> I can change it and move the Set(ChangingPresence,
> TRUE) code to set_requested_presence in mcd-account.c, but we would need to
> cover other cases as when the connection cannot go online

Please do.

Also, I'm not sure that ChangingPresence should always be cleared by a
PresencesChanged signal for the self-handle. Consider this:

* we call SetPresence for HIDDEN (but the CM doesn't support "pre-loading"
presences, so it will fail)
* we call Connect
* time passes
* SetPresence returns failure
* Connect returns success
* time passes
* StatusChanged(CONNECTED)
* PresencesChanged({self: available}) [1]
* we respond to StatusChanged by fetching Statuses
* time passes
* Statuses comes back
* we can now call SetPresence again; knowing that HIDDEN is impossible, we'll
settle for BUSY
* PresencesChanged({self: busy}) [2]
* SetPresence returns success [3]

You'd clear ChangingPresence at [1]. I think it shouldn't be cleared until [2]
or [3].

(Or, to put it another way: ChangingPresence is TRUE if we have a SetPresence
call either in-flight or queued up.)

I think it might be easiest to decompose the state into several booleans
(SetPresence in flight / we're connecting / ...), and have the actual value of
ChangingPresence computed from those. It's OK if you sometimes emit
AccountPropertyChanged for ChangingPresence even if it didn't actually change
(although you could avoid that by caching a boolean,
last_emitted_changing_presence).

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list