[Bug 27167] Gabble MailNotification.RequestInboxURL returns empty string

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 18 19:16:56 CET 2010


http://bugs.freedesktop.org/show_bug.cgi?id=27167





--- Comment #1 from Simon McVittie <simon.mcvittie at collabora.co.uk>  2010-03-18 11:16:56 PST ---
(In reply to comment #0)
> The solution I wrote is to return from Subscribe call after the request for
> data terminates.

> Another solution I could have used is to return from the
> RequestInboxURL after the data has arrived.

I'd prefer it if this was what happened: I think it should be valid to call
Subscribe and immediately follow up with RequestInboxURL.

(It's clearly wrong to call RequestMailURL before you have any mails, though
:-)

> The benefit of the first solution
> over the second is that you never get the initial unread-count right, instead
> of getting 0 and then the real number.

I can see that that's an advantage of having Subscribe() wait, although I think
it's orthogonal to how the other methods behave; all the methods "can be slow",
so logically they all ought to be prepared to wait.

(In practice this probably means that instead of a queue of contexts, you need
a queue of struct { enum, context } where the enum takes values SUBSCRIBE and
REQUEST_INBOX.)

> The cons of this method is that
> according to the spec Subscribe cannot return a network error, which could
> happen if the server fails to respond.

I consider the error conditions in the spec to be advisory, rather than
exhaustive: any D-Bus method call can fail at any time for any reason. If you
think it's useful for Subscribe to wait for initial setup where necessary, I'd
welcome a spec patch to say so.


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



More information about the telepathy-bugs mailing list