Closed
Bug 1042040
Opened 11 years ago
Closed 11 years ago
Define a function to generate unique ID for the XML Stanza which MUST have uniquely generated id/sid.
Categories
(Chat Core :: XMPP, defect)
Chat Core
XMPP
Tracking
(Not tracked)
RESOLVED
FIXED
1.6
People
(Reporter: mayanktg, Assigned: mayanktg)
References
()
Details
Attachments
(1 file, 1 obsolete file)
2.03 KB,
patch
|
aleth
:
review+
|
Details | Diff | Splinter Review |
The XEP:0167-Jingle RTP Session and XEP:0096-SI File Transfer require uniquely generated SID (see RFC 6120 section 4.7.3).
So we would be using a common generateId() function which generates these unique IDs.
Assignee | ||
Comment 1•11 years ago
|
||
The patch to generate unique ID/SID for XML stanzas.
Attachment #8460199 -
Flags: review?(clokep)
Attachment #8460199 -
Flags: feedback?
Assignee | ||
Updated•11 years ago
|
Attachment #8460199 -
Flags: feedback?
Comment 2•11 years ago
|
||
Comment on attachment 8460199 [details] [diff] [review]
Add a function to generate unique id/sid.
Review of attachment 8460199 [details] [diff] [review]:
-----------------------------------------------------------------
::: chat/protocols/xmpp/xmpp.jsm
@@ +277,5 @@
> },
>
> + /* Generate unique sid for the stanza. Using id and
> + unique sid is defined in RFC 6120 (Section 8.2.3, 4.7.3). */
> + generateId: function() {
Please put this in the account prototype not the conversation prototype so it can be used by everything.
@@ +280,5 @@
> + unique sid is defined in RFC 6120 (Section 8.2.3, 4.7.3). */
> + generateId: function() {
> + let uuid = Cc["@mozilla.org/uuid-generator;1"]
> + .getService(Ci.nsIUUIDGenerator).generateUUID();
> + return uuid.toString().split("-")[0].slice(1);
Why are you only using the first bit? Is there a maximum length? This doesn't seem like a good idea.
Attachment #8460199 -
Flags: review?(clokep) → review-
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8460199 -
Attachment is obsolete: true
Attachment #8460245 -
Flags: review?(aleth)
Updated•11 years ago
|
Attachment #8460245 -
Flags: review?(aleth) → review+
Updated•11 years ago
|
Keywords: checkin-needed
Comment 4•11 years ago
|
||
Updated•11 years ago
|
Target Milestone: --- → 1.6
You need to log in
before you can comment on or make changes to this bug.
Description
•