Closed Bug 842235 Opened 12 years ago Closed 12 years ago

B2G MMS: retry send on error

Categories

(Core :: DOM: Device Interfaces, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22
blocking-b2g leo+
Tracking Status
firefox20 --- wontfix
firefox21 --- wontfix
firefox22 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix

People

(Reporter: vicamo, Assigned: ctai)

References

Details

(Whiteboard: [by 3/8])

Attachments

(1 file, 5 obsolete files)

No description provided.
Blocks: 840048
Summary: B2G MMS: retry sent on error → B2G MMS: retry send on error
Assignee: nobody → vyang
leo+, this bug is needed to fulfill MMS user stories for v1.1
blocking-b2g: --- → leo+
Whiteboard: [by 3/8]
Assignee: vyang → ctai
Attached patch WIP-Retry send on error (obsolete) (deleted) — Splinter Review
Attached patch Retry Send MMS (obsolete) (deleted) — Splinter Review
Attachment #722102 - Attachment is obsolete: true
Attachment #722665 - Flags: review?(vyang)
Comment on attachment 722665 [details] [diff] [review] Retry Send MMS Review of attachment 722665 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/mms/src/ril/MmsService.js @@ +687,5 @@ > return; > } > > + this.retryCount = 0; > + let that = this; You don't need this. @@ +696,5 @@ > + that.retryCount++; > + let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); > + timer.initWithCallback((function (){ > + this.send(retryCallback); > + }).bind(that), let retryCallback = (function (mmsStatus, msg) { if ((MMS.MMS_PDU_ERROR_TRANSIENT_FAILURE == mmsStatus || MMS.MMS_PDU_ERROR_PERMANENT_FAILURE == mmsStatus) && this.retryCount < MAX_RETRY_COUNT) { this.retryCount++; let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); timer.initWithCallback(this.send.bind(this, retryCallback), DELAY_TIME_TO_RETRY, Ci.nsITimer.TYPE_ONE_SHOT); return; } callbackIfValid(mmsStatus, msg); }).bind(this); this.send(retryCallback); @@ +702,5 @@ > + Ci.nsITimer.TYPE_ONE_SHOT); > + return; > + } > + if (callback) { > + callback(mmsStatus, msg); callbackIfValid instead. @@ +713,5 @@ > + * A callback function that takes two arguments: one for > + * X-Mms-Response-Status, the other for the parsed M-Send.conf message. > + */ > + send: function send(callback) { > + let callbackIfValid = function callbackIfValid(mmsStatus, msg) { You actually pass |retryCallback| to |send|, so the |callback| here is always valid.
Attachment #722665 - Flags: review?(vyang)
Attached patch Retry Send MMS (obsolete) (deleted) — Splinter Review
Attachment #722665 - Attachment is obsolete: true
Attachment #722707 - Flags: review?(vyang)
Comment on attachment 722707 [details] [diff] [review] Retry Send MMS Review of attachment 722707 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/mms/src/ril/MmsService.js @@ +702,5 @@ > + } > + > + callbackIfValid(mmsStatus, msg); > + }).bind(this); > + }, Have you tried it? You missed send() here.
Attachment #722707 - Flags: review?(vyang) → review-
Attached patch Retry Send MMS (obsolete) (deleted) — Splinter Review
Attachment #722707 - Attachment is obsolete: true
Attachment #723045 - Flags: review?(vyang)
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #6) > Comment on attachment 722707 [details] [diff] [review] > Retry Send MMS > > Review of attachment 722707 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/mms/src/ril/MmsService.js > @@ +702,5 @@ > > + } > > + > > + callbackIfValid(mmsStatus, msg); > > + }).bind(this); > > + }, > > Have you tried it? You missed send() here. My bad...orz
Attachment #723045 - Flags: review?(vyang)
Attached patch Retry Send MMS (obsolete) (deleted) — Splinter Review
Attachment #723045 - Attachment is obsolete: true
Attached patch Retry Send MMS (deleted) — Splinter Review
Attachment #723325 - Attachment is obsolete: true
Attachment #723326 - Flags: review?(vyang)
Comment on attachment 723326 [details] [diff] [review] Retry Send MMS Review of attachment 723326 [details] [diff] [review]: ----------------------------------------------------------------- Thank you :)
Attachment #723326 - Flags: review?(vyang) → review+
expect to land 3/11
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Blocks: 862263
Flags: in-moztrap-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: