Bug 1035130 - Part 1: Only accept one conference request at a time. r=hsinyi
authorSzu-Yu Chen [:aknow] <szchen@mozilla.com>
Wed, 09 Jul 2014 19:39:00 -0400
changeset 193341 81abb9a43f2ce0e43a8042d6cf5ca8221b093849
parent 193340 e619eb4859495461e9ffa3254416a306427d7014
child 193342 48a8caaf166a820ba9c95cde989cd7a60b44a000
push id27116
push userryanvm@gmail.com
push dateThu, 10 Jul 2014 22:09:47 +0000
treeherdermozilla-central@0a0348d3f0c8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi
bugs1035130
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1035130 - Part 1: Only accept one conference request at a time. r=hsinyi
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -1856,16 +1856,25 @@ RilObject.prototype = {
   // Flag indicating whether user has requested making a conference call.
   _hasConferenceRequest: false,
 
   conferenceCall: function(options) {
     if (this._isCdma) {
       options.featureStr = "";
       this.sendCdmaFlashCommand(options);
     } else {
+      // Only accept one conference request at a time..
+      if (this._hasConferenceRequest) {
+        options.success = false;
+        options.errorName = "addError";
+        options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
+        this.sendChromeMessage(options);
+        return;
+      }
+
       this._hasConferenceRequest = true;
       this.telephonyRequestQueue.push(REQUEST_CONFERENCE,
                                       this.sendRilRequestConference, options);
     }
   },
 
   sendRilRequestConference: function(options) {
     this.context.Buf.simpleRequest(REQUEST_CONFERENCE, options);