[Bug 27271] clean up TplLogEntry, TplLogEntryText API

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jun 9 16:21:22 CEST 2010


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

--- Comment #18 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-06-09 07:21:22 PDT ---
(In reply to comment #17)
> TplLogEntry::log-id is craeted by _tpl_create_message_token() (there is a
> comment about Bug #26838 before this function declaration).
> 
> Which is a hash of channel-path, timestamp and pending-msg-id.

Channel object paths are not unique (in practice, the channel path depends on
the peer handle in most connection managers). If all of this happens within the
same second:

* receive a message which creates a channel /C, with pending message number 0
* close that channel
* receive a message from the same contact, which creates another channel /C
with pending message number 0

then you'll get a collision.

> This should guarantee uniqueness, at least for the fact that it's not possible
> (confirm? :) to have two messages having the same p-msg-id and timestamp within
> the same channel.

It's not possible to have two messages with the same pending message ID within
the same channel, assuming you don't receive 2**32 messages in one channel.

(CMs don't check for this, in practice; in principle they should open a new
channel after 2**32 messages, or something, but even at 1000 messages per
second, it would take 49 days to receive this many messages. Real IM sessions
are neither that long nor that rapid :-)

-- 
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